Comment 8 for bug 309223

Revision history for this message
Abdulaziz Ghuloum (aghuloum) wrote : Re: [Bug 309223] Re: expansion of splicing let-syntax needs revision

On Jun 25, 2009, at 9:19 PM, leppie wrote:

> #!r6rs
> (import (rnrs))
>
> (define lit 41)
>
> (define-syntax foo
> (syntax-rules (lit)
> ((_ lit)
> (syntax-rules () ((_) lit)))))
>
> (let ((lit2 42))
> (let-syntax ((z (foo lit)))
> (display (z))))
>
> This should not run.

Why not?

> Changing lit2 to lit raises what seems an incorrect error.

Huh? What do you mean incorrect error.
(let ((lit 42)) (foo lit)) should *not* match the rule for foo
since the two "lit"s are not free-identifier=?.

Aziz,,,