[plt-scheme] Eq bindings at different phase levels? (SOLVED)

From: Remco Bras (vrsoft at gmail.com)
Date: Sat Feb 20 09:50:19 EST 2010

On Sat, Feb 20, 2010 at 3:36 PM, Matthew Flatt <mflatt at cs.utah.edu> wrote:
> That sounds right. If your registration function is something like
>
>  (register 'id proc)
>
> then you could make `define-with-transformer' expand to
>
>  (begin-for-syntax (register 'id proc))
That looks about right.

>
> If your transformer bindings should have the usual lexical scope, you
> can avoid a hash table and exploit even more of the macro system by
> having `define-with-transformer' expand to
>
>  (define-for-syntax id (make-my-transformer proc))
>
> Then, `with-transformer' can use `syntax-local-value' to get an
> identifier's binding.
>
>
To me, this approach produces a little too much clutter in the
environment, so I'll go with the above.

Thanks,

-Remco


Posted on the users mailing list.