I'm working on a #%module-begin variant that provides all module-level
bindings, and I'm having trouble finding the right way to give lexical
context to all-defined-out.
The issue (IIUC) is that all-defined-out only exports identifiers "that
have the same lexical context as the (all-defined-out) form"; however, I
want to have #%module-begin introduce all-defined-out, but have it export
the identifiers defined by the programmer in the body of the module.
Currently what I'm doing is essentially this:
(module lang racket
(provide (except-out (all-from-out racket)
;all-defined-out ;can't omit this
(require (for-syntax syntax/parse))
(define-syntax (providing-module-begin stx)
[(_ body:expr ...)
(provide #,(datum->syntax stx '(all-defined-out)))
(module demo (submod ".." lang)
(require (submod "." demo))
This almost works — the providing happens correctly — but it requires that
the lang module provide all-defined-out, which I don't actually want to be
Is there a way to give all-defined-out the lexical context I'm looking for?
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
For more options, visit https://groups.google.com/d/optout.