On Aug 15, 2015, at 11:53 PM, Alexander D. Knauth <[email protected]> wrote:

> Does this work?
> (define-syntax my-module-begin
>  (lambda (stx)
>    (syntax-case stx ()
>      [(_ body ...)
>       (with-syntax ([sub-id (datum->syntax stx ''sub)])
>         #'(#%module-begin
>             (module sub-id racket/base
>               (define x 2)
>               (provide x))
>             (require sub-id)
>             (provide (all-from-out sub-id))
>             body ...))])))

I just realized that's not your example, so anyway, does modifying your example 
to use (datum->syntax stx ''sub) instead of (datum->syntax stx 'sub) work?

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to