Re: [racket-users] Using local-expand to mostly expand a module?

2016-01-31 Thread Matthew Flatt
I think you need to use a trampoline for the module body's expansion, where you expand only one module-body form at a time and let `#%module-begin` finish up forms like `require` or `define-syntaxes` before you macro continues with later forms. The general pattern is that you have a macro

[racket-users] Using local-expand to mostly expand a module?

2016-01-29 Thread reilithion
I'm trying to make a little EDSL that has one form that is special and needs to be collected and later processed. I want to allow a user of the EDSL to write a macro that expands to the special form. I have a module-begin that (so far) looks like this: (define-syntax (module-begin stx)