At Sat, 12 Mar 2016 09:45:57 -0500, Matthias Felleisen wrote:
> 
> > On Mar 11, 2016, at 8:01 PM, Alexis King <[email protected]> wrote:
> > 
> > The documentation for module* would seem to indicate that submodules
> > declared with module* can require their parent modules:
> > 
> >> Like module, but only for declaring a submodule within a module,
> >> and for submodules that may require the enclosing module.
> > 
> > However, this doesn’t seem to actually work when I try it—I get an
> > error about a cycle in module loading for the following program
> > when saved as “foo.rkt”:
> > 
> >  #lang racket
> >  (module* test racket/base
> >    (require "foo.rkt"))
> > 
> > It seems to work if I (require (submod "..")) instead, but if this
> > is necessary, it would be nice if the documentation noted that.
> > 
> 
> Yes, this works and it is a great way to test provided-contracted functions. 

For now, I'll update the docs to clarify that `(submod "..")` must be
used to refer to the parent.

I'll also think about whether "foo.rkt" can and should work. It's not
clear to me, because the intent is that a module is compiled
independent of its run-time path. Trying to merge the existing notion
of "current module being compiled" with "name at which this module
being compiled is expected to be instantiated" might create problems.

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to