[plt-scheme] composing syntax-case macros?

From: YC (yinso.chen at gmail.com)
Date: Sat Jan 17 02:05:03 EST 2009

On Fri, Jan 16, 2009 at 6:12 PM, Ryan Culpepper <ryanc at ccs.neu.edu> wrote:

> That approach has a flaw that has nothing to do with the error you got.
> Suppose that you write a module that imports just 'cond-it', not 'if-it'. Or
> suppose that your module renames them or prefixes their names when you
> import them. Then when your macro creates the 'if-it' identifier, it will
> have the context of that module, where 'if-it' isn't bound. You're trying to
> use 'if-it' to carry the lexical context for the 'it' binding it introduces,
> but its lexical context is already doing work---it tells the macro expander
> where to look up the 'if-it' macro.

I see.  Thanks.

I wrote a blog post about syntax parameters a couple years ago:
> http://macrologist.blogspot.com/2006/04/macros-parameters-binding-and.html
> Other than that, the Guide and the Reference.
> I'm also working on a collection of macro techniques and design patterns. I
> hope to post a draft of it sometime in the near future.

Thanks for the link - looking forward to your draft!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20090116/87ab61c8/attachment.html>

Posted on the users mailing list.