-
-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
require/expose
does not work on macros
#152
Comments
I don't think it's possible, nor do I think it's something we want to encourage in the first place. What were you planning to use this functionality for? |
Thanks for your reply. I'm developing a module-aware IDE for racket. In particular, a user develops code in one module (A) and requires it in another (B), and keeps doing this without restarting the racket runtime. Without |
I don't think you need |
Thanks for the pointers! If I understand correctly, you mean: ;; define module A with all-defined-out
(module A racket
(provide (all-defined-out))
(define a 1))
;; dynamically add a new binding b
(enter! 'A)
(define b 2)
(enter! #f)
;; try to reload
(dynamic-rerequire ''A)
;; OK
(dynamic-require ''A 'a)
;; ERROR: dynamic-require: name is not provided, name: 'b
(dynamic-require ''A 'b)
;; OK
(require/expose 'A (b)) Looks like this is not working, |
require/expose
can require an unprovided binding from a module. But it only works on functions, not macros. E.g.The relative code blocks implementing
require/expose
:rackunit/rackunit-lib/rackunit/private/util.rkt
Lines 72 to 77 in 6c04ee2
The reason is quite simple: transformer bindings are not available at runtime thus
(apply eval names)
thows error. Is it possible to makerequire/expose
work on macros?The text was updated successfully, but these errors were encountered: