[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: define-macro bug?
Things are clearer (excluding the 'S-expression macros from the
alchemists days of macro usage', which, I assume is from before my
time).
Thanks.
Ittai
> Welcome to DrScheme, version 200alpha17-cvs23apr2002.
> Language: Full.
> > (module a mzscheme
> (require (lib "defmacro.ss"))
> (provide egg)
> (define foo 'in-a)
> (define-macro egg (lambda (x) 'foo)))
> > (module b mzscheme
> (require a)
> (define foo 'in-b-because-these-macros-are-neither-hygienic-nor-scope)
> (display (egg 5))
> (newline))
> > (require b)
> in-b-because-these-macros-are-neither-hygienic-nor-scope
>
> or
>
> Welcome to DrScheme, version 200alpha17-cvs23apr2002.
> Language: Full.
> > (define foo 'in-b-because-these-macros-are-neither-hygienic-nor-scope)
> > (define-macro egg (lambda (x) 'foo))
> > (display (egg 5))
> in-b-because-these-macros-are-neither-hygienic-nor-scope
>
> Again the key is that macros and values are phase separated. If you want
> foo, think S-expression macros from the alchemists days of macro usage.
>
> -- Matthias