[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: should definitions introduced by macros be gensymmed?
> (define-syntax define-foo
> (syntax-rules ()
> ((_ expr) (define foo expr))))
>
> (let ()
> (define-foo (display 'f))
> (define-foo (display 'o))
> (define o 'o)
> o)
>
> When I evaluate these in MzScheme (v200alpha15), everything works fine
> (it displays "foo"). But when I evaluate these in DrScheme (language
> "Textual (MzScheme)"), it complains:
>
> def-foo.scm:3:23: letrec-values: duplicate binding name in: foo
This is a bug in MzScheme. If you compose `expand' with itself and
apply the result to the second expression, MzScheme produces the error.
I'm working on it.
Matthew