On Jun 18, 2009, at 8:08 AM, Derick Eddington wrote:
Because #'dummy-ctxt has a lexical context and so any bound identifiers with a matching lexical context will incorrectly be said to be unbound:
Correct. Specifically, in the code given, #'dummy-context (which I usually call #'here) captures the identifiers id, unbound?, stx, use-unbound, and all things outside of the macro definition (e.g., lambda, define-syntax, cons, etc.). It's not uncommon that #'here captures a few hundred identifiers.
(define-syntax use-unbound (lambda (stx) (define (unbound? id)(let ((unbound-id (datum->syntax #'dummy-ctxt (syntax->datum id))))(free-identifier=? id unbound-id))) (syntax-case stx () ((_ id) (unbound? #'id) #''unbound) ((_ id) #''bound))))
Aziz,,,
