[plt-scheme] [scribble] syntax quasi/unquote

From: Eric Tanter (etanter at dcc.uchile.cl)
Date: Thu Apr 29 11:13:56 EDT 2010

>> Meanwhile, you can use
>> `eval:alts' to separate the typeset expression from the evaluated
>> expression. Then, for the typeset part, escape to use SCHEME:
>> @interaction[
>> (eval:alts @#,SCHEME[#`(#,10)] #`(#,10))
>> ]
> Sorry I did not understand that. 

Despite the fact that there is no entry in the manul for eval:alts, I finally figured out that eval:alts typesets its first argument and evaluates the second. 

I don't see how this helps me in my issue however. I already know how to typeset my macro without evaluating, ie. using @SCHEMEBLOCK.

What I don't manage to do is to evaluate the macro definition in a given evaluator.
So using eval:alts, I can't give the macro definition as second parameter.

any idea?


-- Éric

> Concretely I want the following:
>  (define-syntax FOO
>   (lambda (stx)
>     (syntax-case stx ()
>      ((FOO val)
>       (let ((var (datum->syntax stx 'x)))
>        #`(let ((#,var (lambda ....)))
>            ....))))
> ]
> to be turned into the equivalent of a @def+int

Posted on the users mailing list.