[plt-scheme] macrophases

From: Andre van Tonder (andre at het.brown.edu)
Date: Fri Apr 9 18:25:00 EDT 2004

On Sun, 4 Apr 2004, Anton van Straaten wrote:

> I'm just curious, since it really doesn't matter much now that it's working:
> I've posted some syntax-case code at:
> http://www.appsolutions.com/code/typeclass.html
> To be able to reuse the function make-prefixed-id in three places in the
> define-class macro, I resorted to a separate module, imported with
> require-for-syntax.  This works fine.  Before that, I tried a number of ways
> to include the function definition within the define-class macro.  But since
> make-prefixed-id is used at multiple levels - including within a macro
> generated by the top-level macro - it seems that to make this work, a trick
> would be needed that I don't know.  Is there such a trick?

A trick which should work would be to code make-prefixed-id as a CPS macro
instead of as a procedure. This would require some rewriting of the macros
that use it, but the resulting code would not need module system support.


Posted on the users mailing list.