[plt-scheme] let-syntax bug
Andre-
I believe that what you are pointing out is not a bug.
See previous discussion:
http://list.cs.brown.edu/pipermail/plt-scheme/2004-February/004939.html
http://list.cs.brown.edu/pipermail/plt-scheme/2002-August/000394.html
http://www.cs.utah.edu/plt/mailarch/plt-scheme-2002/msg00166.html
-Felix
On Apr 6, 2004, at 10:47 AM, Andre van Tonder wrote:
> For list-related administrative tasks:
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>
> After some more thought, it seems to me that the failure of MzScheme on
> the following should probably be regarded as a bug (unless the bug is
> in
> my model below):
>
> (let-syntax
> ((test (syntax-rules ()
> ((test name) (define-syntax name
> (syntax-rules ()
> ((name) 'hello)))))))
> (test test1))
>
> ;==> fails
>
> (test1) ;==> should give 'hello
>
> According to my understanding of syntax-rules/case, the let-syntax
> transformer should expand as follows, where identifiers introduced in
> the template transcription are given a new color:
>
> (define-syntax~1 test1
> (syntax-rules~1 ()
> ((test1) 'hello)))
>
> Now, since there is no enclosing binding for the identifiers,
> define-syntax~1 and syntax-rules~1, we can erase the color to get
>
> (define-syntax test1
> (syntax-rules ()
> ((test1) 'hello)))
>
> which should then execute normally. Am I using the wrong model? This
> is
> breaking some macro-generating macros which I am trying to express
> using
> syntax-rules.
>
> Best regards
> Andre
>
>
>
>
>
>
----
Embrace and Extend RFC1149