[racket] syntax-parse #:at

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Mon May 21 08:02:36 EDT 2012

At Sun, 20 May 2012 22:42:30 -0600, Jon Rafkind wrote:
> The issue is why do I have to use a name other than 'name' for the
> pattern variable on the line where it says 'HERE'. If I use the
> 'name' pattern variable then the syntax-parse form generated by
> 'make-transformer' will use the wrong lexical context for the literal
> set. I don't see how the lexical context of the outer 'name' differs
> from the inner 'new-name', other than the 'new-name' has an extra
> mark on it.

When you use `name' instead of `new-name', then `name' gets replaced by
`x' from the use of `define-new-syntax', and `x' (unlike `name') has a
different lexical context than `new-name'.


Posted on the users mailing list.