[racket-users] Using ‘except-in’ to exclude identifiers for a single phase level

2015-06-28 Thread Alexis King
I ran across some behavior that I find a little bit surprising. Consider the following module: #lang racket/base ; the definition of some-fn (module a racket/base (provide some-fn) (define (some-fn) (void))) ; provides some-fn in multiple phase levels (module b racket/base

Re: [racket-users] Using ‘except-in’ to exclude identifiers for a single phase level

2015-06-28 Thread Benjamin Greenman
Sure, you just need to require and provide b at your favorite phase level in c. Replacing module c with the following makes the rest compile for me: (module c racket/base ;; Require provide everything except `some-fun` at phase 0 (require (except-in (submod .. b) some-fn)) (provide

Re: [racket-users] Using ‘except-in’ to exclude identifiers for a single phase level

2015-06-28 Thread Alexis King
Nope, that doesn’t work. If you try it, you’ll see that some-fn is still available in phase 1. That’s because the (provide (all-from-out (submod .. b))) provides it as well, which is why I’ve been struggling. On Jun 28, 2015, at 13:09, Benjamin Greenman bl...@cornell.edu wrote: No problem,

Re: [racket-users] Using ‘except-in’ to exclude identifiers for a single phase level

2015-06-28 Thread Benjamin Greenman
No problem, just change the provides around. Maybe the problem is that you're missing the (require (for-syntax ...)) ? (module c racket/base ;; Require provide everything except `some-fun` at phase 1 (require (for-syntax (except-in (submod .. b) some-fn))) (provide (for-syntax

Re: [racket-users] Using ‘except-in’ to exclude identifiers for a single phase level

2015-06-28 Thread Benjamin Greenman
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. On Sun, Jun 28, 2015 at 5:40 PM, Alexis King lexi.lam...@gmail.com wrote: Nope, that doesn’t work. If you try

Re: [racket-users] Using ‘except-in’ to exclude identifiers for a single phase level

2015-06-28 Thread Alexis King
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