> On Oct 12, 2017, at 6:31 PM, Alexis King <lexi.lam...@gmail.com> wrote:
>> On Oct 12, 2017, at 1:46 PM, Matthew Flatt <mfl...@cs.utah.edu> wrote:
>> You could put all the type exports in a submodule. Then, you do need
>> your own variant of `require`, but that variant can mostly just check
>> for the presence of a type submodule, much the way that TR or
>> `plai-typed` do. If the submodule is available, you can import it with
>> the extra scope for types.
> This makes a lot of sense to me, but I’m not completely sure how to
> implement the providing side. I imagine that users may very well want
> to use Racket’s namespace management features with types, leading to
> pathological declarations like this:
> (provide (except-out (all-from-out foo/bar)
> (type-out ExcludedType)))
> If type-out is a provide transformer that doesn’t actually provide
> anything, it merely expands to a submodule (perhaps using
> `syntax-local-lift-module-end-declaration`), then it can’t possibly
> understand that it should be doing something different when used in
> “excluding” position. Is the unfortunate answer here that I can’t get
> around needing to reimplement my own version of `provide` as well?
I just implemented this, and this is a problem, but the `all-from-out` form in
general is an ever bigger problem, it's completely broken.
The first strategy is to just lift the provide form into a submodule, but
`all-from-out` expects there to be a require in the *same* module,
`all-from-out` always yells at you with the error, all-from-out: no
The second strategy is to try to resolve the `all-from-out` references in the
pre-transformer using `expand-export`. However this is still broken for
`all-from-out` because `syntax-local-module-required-identifiers` complains
about "not currently transforming module provides."
(syntax-local-transforming-module-provides? is false). All-from-out uses
syntax-local-module-required-identifiers to determine what identifiers should
be in it, and that needs to be called within a provide-transformer, not a
To create a new lifted module I need to use a provide-pre-transformer, but to
resolve all-from-out's properly I need to use a provide-transformer. Is there
any way around this?
What I have so far:
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
For more options, visit https://groups.google.com/d/optout.