fix HtDP require so that it correctly binds fo lib and planet paths
svn: r6120
This commit is contained in:
parent
e4b7d760d5
commit
448cba2fb5
|
@ -1171,7 +1171,9 @@
|
|||
(something-else v)))
|
||||
(check-string-form stx v))
|
||||
s)
|
||||
#'(require (lib . rest)))]
|
||||
;; use the original `lib', so that it binds correctly:
|
||||
(syntax-case stx ()
|
||||
[(_ ms) #'(require ms)]))]
|
||||
[(_ (planet . rest))
|
||||
(syntax-case stx (planet)
|
||||
[(_ (planet s1 (s2 s3 n1 n2)))
|
||||
|
@ -1184,7 +1186,9 @@
|
|||
(check-string-form stx #'s1)
|
||||
(check-string-form stx #'s2)
|
||||
(check-string-form stx #'s3)
|
||||
#'(require (planet . rest)))]
|
||||
;; use the original `planet', so that it binds correctly:
|
||||
(syntax-case stx ()
|
||||
[(_ ms) #'(require ms)]))]
|
||||
[_else
|
||||
(teach-syntax-error
|
||||
'require
|
||||
|
|
|
@ -217,6 +217,11 @@
|
|||
(htdp-top-pop 1)
|
||||
(htdp-teachpack-pop)
|
||||
|
||||
;; Check require
|
||||
(htdp-top (require (lib "unit.ss" "mzlib")))
|
||||
(htdp-test #f unit? 12)
|
||||
(htdp-top-pop 1)
|
||||
|
||||
;; Error messages
|
||||
(htdp-top (define my-x 5))
|
||||
(htdp-top (define (my-f x) (+ x 5)))
|
||||
|
|
Loading…
Reference in New Issue
Block a user