Thanks for your help. I did consider the only-meta-in approach, but then I’d be
excluding the syntax-rules export as well, which I was trying to avoid if
possible.
> On Jun 29, 2015, at 7:39 AM, Matthew Flatt wrote:
>
> You're right that there's not a form that's like `except-out` but
> constr
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 de
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 r5
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 wrote:
> Nope, that doesn’t work. If you try it, you’ll see that
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 wrote:
>
> No problem, just change t
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 (all-from-
You're right, that works for including some-fn in phase 1 but not phase 0. The
trouble is that I actually want the inverse of that: some-fn should be defined
in phase 0 but not phase 1.
(require 'c)
some-fn ; defined here
(begin-for-syntax
some-fn) ; not defined here
I haven't figured
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 (all
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
9 matches
Mail list logo