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
    (require (submod ".." a)
             (for-syntax (submod ".." a)))
    (provide some-fn
             (for-syntax some-fn)))

  ; excludes some-fn in phase 0... and phase 1?!
  (module c racket/base
    (require (except-in (submod ".." b) some-fn))
    (provide (all-from-out (submod ".." b))))

  (require 'c)
  (begin-for-syntax
    ; not defined!
    some-fn)

This demonstrates that except-in appears to remove identifiers from *all* phase 
levels, not just phase 0. Is there any way to restrict except-in to a 
particular phase level, or is there a different way to accomplish that sort of 
behavior?

For context, I ran into this while seeing what it would be like to create an 
“r5rs+” lang that permits things like ‘syntax-case’, so I effectively want to 
provide all the bindings from ‘r5rs’, but I want to exclude the ‘#%top’, 
‘#%datum’, and ‘#%app’ bindings that r5rs exports for phase 1, which restrict 
expressions in phase 1 to only use syntax-rules (I’d replace these with the 
normal bindings exported for phase 0).

Alexis

-- 
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.

Reply via email to