[plt-scheme] transformer binding

From: Ed Cavazos (proteus at theworld.com)
Date: Wed May 7 01:28:31 EDT 2003

David Van Horn <dvanhorn at cs.uvm.edu> writes:

> I'm probably missing something obvious here, but how do I bind f in g's
> transformer environment here?  TIA.
> (module z mzscheme
>   (define (f x) x)
>   (define-syntax (g stx)
>     (syntax-case stx ()
>       ((_ e)
>        (datum->syntax-object stx (f (syntax-object->datum #'e))))))
>   )

I think require-for-syntax can help here. If you put the helper
function inside a module, I think require-for-syntax will let you use
it inside macro definitions. I'm a total syntax newbie so take this
with a 5-pound bag of salt. Anywho, check this link out:



Posted on the users mailing list.