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
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
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,
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
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
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
6 matches
Mail list logo