Created
August 13, 2012 20:35
-
-
Save samth/3343933 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #lang racket/load | |
| (module lang racket/base | |
| (require (for-syntax racket/base)) | |
| (provide (rename-out [mb #%module-begin]) (except-out (all-from-out racket/base) #%module-begin)) | |
| (define-syntax (mb stx) | |
| (syntax-case stx () | |
| [(_ rest ...) | |
| (local-expand #'(#%plain-module-begin rest ...) 'module-begin null)]))) | |
| (module lang2 racket/base | |
| (require (for-syntax racket/base)) | |
| (provide (rename-out [mb #%module-begin]) (except-out (all-from-out racket/base) #%module-begin)) | |
| (define-syntax (mb stx) | |
| (syntax-case stx () | |
| [(_ rest ...) | |
| #'(#%plain-module-begin (begin-for-syntax (module* foo #f)) rest ...)]))) | |
| (module n 'lang | |
| (module m 'lang2)) | |
| ; module*: unbound identifier in the transformer environment; | |
| ; also, no #%app syntax transformer is bound in: module* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment