[plt-scheme] question about transfer of value from transformer to run time

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Sun Jun 17 17:09:32 EDT 2007

At Sun, 17 Jun 2007 21:39:23 +0200, "Jos Koot" wrote:
> (module c mzscheme
> ;option used both in transformer and run time environment
>  (define-for-syntax option 2)
>  (define-syntax (transfer stx)
>   (syntax-local-introduce #`(define option (#%datum . #,option))))
>  (transfer)
> [...]
> 
> This seems to do what I want, but it seems a little bit tricky too. Can I 
> trust the approach in module c, or is the approach in modules a and b safer?

This should work fine, as long as the value of `option' is a simple
constant (i.e., something that could have been produced by `read').

Matthew



Posted on the users mailing list.