How would you intend to use the macro transformer functions in the
debug-repl? Do you intend to call them as functions on syntax objects? I'm
not sure I understand what you're trying to achieve.

-Philip

On Fri, Jan 20, 2017 at 3:40 AM, Alex Knauth <alexan...@knauth.org> wrote:

>
> On Jan 19, 2017, at 8:44 PM, Philip McGrath <phi...@philipmcgrath.com>
> wrote:
>
> It might help if you could explain in more detail what you're trying to
> do: I'm not sure I understand what you mean by "bring macro transformer
> procedures down to run-time".
>
>
> My goal is to have a debug-repl that includes everything in it's scope.
> Debug-repl can use syntax-local-value access to the macro transformers in
> it's scope, but they are compile-time objects; if I just embed them in the
> expanded code it won't compile.  However, I these things at run-time to
> attach them to the namespace.
>
> If I could serialize the lambda in
> (define-syntax m
>   (lambda (stx) ....))
> I could recover it at run-time and add it to the debug-repl namespace.
>
> (define (f x)
>   (define-syntax m
>     (serial-lambda (stx) ; syntax-local-lift-provide: not expanding in a
> module run-time body
>       (syntax-case stx () [(_ e) #'e])))
>   (debug-repl))
>
> Alex Knauth
>
> -Philip
>
> On Wed, Jan 18, 2017 at 6:24 PM, Alex Knauth <alexan...@knauth.org> wrote:
>
>> I'm trying to use serial-lambda in macro transformer procedures so that I
>> can serialize them and bring them down to run-time. However, serial-lambda
>> isn't working within a define-syntax. It says:
>>
>> syntax-local-lift-provide: not expanding in a module run-time body
>>
>> This seems to be a lie; it works fine in a begin-for-syntax (as long as
>> you don't try to deserialize). What's the real reason it doesn't work in a
>> define-syntax? Is there another way to bring macro transformer procedures
>> down to run-time?
>>
>> Alex Knauth
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to