original commit: 96880c44ab9cd1127fbf013dd1f863ff5e049369
This commit is contained in:
Matthew Flatt 2002-02-03 02:16:19 +00:00
parent adabeaadae
commit 3539dc22ec

View File

@ -424,12 +424,12 @@
[(_ expr0 expr ...)
(syntax (begin expr0 expr ... rest))])))))])))
(define ns-undefined (gensym))
(define (namespace-defined? n)
(unless (symbol? n)
(raise-type-error 'namespace-defined? "symbol" n))
(with-handlers ([exn:variable? (lambda (x) #f)])
(namespace-variable-binding n)
#t))
(not (eq? (namespace-variable-value n #t (lambda () ns-undefined)) ns-undefined)))
(define-syntax (this-expression-source-directory stx)
(syntax-case stx ()