[plt-scheme] verifying whether a symbol is defined at compile time?
Oops, the contra-example should read:
(require (lib "etc.ss"))
(define-syntax my-define
(syntax-rules ()
((my-define (name . args) . body) (my-define name (lambda args . body)))
((my-define var value)
(define var ; <== correction
(begin
(printf "my-define ~a status is ~s~n" 'var
(if (namespace-defined? 'var) 'defined 'undefined))
value)))))
(if (read) (namespace-set-variable-value! 'b 2))
(my-define b 2)
Jos Koot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20070422/e368f834/attachment.html>