Julian Graham <[email protected]> writes:

> Hi Guilers,

Hi!

> For the purpose of some experiments I've been doing with integrating
> R6RS libraries, I've been trying to figure out ways to wrap
> `define-syntax' so that I can do things like add bindings to a
> module's eval closure before evaluating a macro definition.

Can you give an example?

>  As part
> of this mechanism, I need to be able to save the original transformer
> for `define-syntax' so that I can delegate to it.  When I run the
> following code (either in master or Andy Wingo's "syncase" branch)...
>
>   (use-modules (ice-9 syncase))
>   (define canonical-define-syntax (@ (ice-9 syncase) define-syntax))
>   (canonical-define-syntax foo (syntax-rules () ((_) 'foo)))
>
> ...I get:
>
>   ERROR: In procedure vm-run:
>   ERROR: VM: Stack overflow

Hmm.  I don't really have much idea... but given that define-syntax is
syntax, does (define-syntax canonical-define-syntax define-syntax)
work any better?  Also does it make any difference if you use
use-syntax instead of use-modules ?

Regards,
        Neil


Reply via email to