Created
April 14, 2019 20:18
-
-
Save michaelballantyne/0e685002f57d8cc94cac8f571a464bee to your computer and use it in GitHub Desktop.
submodule problem
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 | |
(module A racket | |
(provide m) | |
(require (for-syntax syntax/parse syntax/location)) | |
(module empty racket | |
(provide #%module-begin)) | |
(define-syntax (m stx) | |
(syntax-parse stx | |
[(_ arg ...) | |
(with-syntax ([racket-use-site (datum->syntax stx 'racket)]) | |
#`(module foo #,(quote-module-path empty) | |
(#%module-begin | |
(require racket-use-site) | |
(define x 5) | |
(println x) | |
arg ...)))]))) | |
(module B racket | |
(require (submod ".." A)) | |
(m #;(+ 1 2))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment