You're right that there's not a form that's like `except-out` but constrained both by name and phase. There's also not an export variant of `only-meta-in`, which would get your half-way there. You could implement a new provide expander to do that.
Otherwise, in addition to the strategy that you describe, another possibility is (require (only-meta-in 0 r5rs) ...) Then you won't have any conflicts from `r5rs` and `racket/base` at phase 1, since there won't be any phase-1 imports from `r5rs`. At Sun, 28 Jun 2015 17:29:37 -0700, Alexis King wrote: > I think it might be time for me to disclose what I’m actually trying to do > here to make it more clear. As mentioned in my original message, I’m trying > to > make a module language just like r5rs but with support for syntax-case > macros. > This was my attempt: > > #lang racket/base > > (require (except-in r5rs define-syntax) > (for-syntax (only-in racket/base > syntax quasisyntax unsyntax unsyntax-splicing > syntax-case with-syntax) > r5rs)) > > (provide (all-from-out r5rs) > define-syntax > (for-syntax (all-from-out r5rs) > (all-from-out racket/base))) > > This doesn’t work, though, because #%top, #%datum, and #%app are already > provided for-syntax by r5rs. I can do (except-in r5rs #%top #%datum #%app > define-syntax), but then those identifiers aren’t defined in phase 0, which > obviously causes problems. > > While writing this email, I realized I can additionally add (only-meta-in 0 > (only-in r5rs #%top #%datum #%app)), which seems to solve the problem. It’s a > bit of a roundabout solution, though. > > > On Jun 28, 2015, at 15:07, Benjamin Greenman <bl...@cornell.edu> wrote: > > > > Oops. Then I'd want to change the all-from-outs to something more specific, > or (preferably) change b to only provide some-fn at one level and make the > requiring module be more specific. > > -- > 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 racket-users+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- 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 racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.