AndrevanTonder wrote:
 > Local imports: Should shadowing take place in either of the two
 > imports below?
 > With e.g. Oleg's solution, shadowing would take place due to at least
 > one, and
 > maybe both, let-bindings.
 >
 >   (let ((r6rs 1)
 >         (base 2))
 >     (local-import (r6rs))
 >     (local-import (r6rs base))
 >     ....)

The assumption in the example I gave was that in an expression like
(local-import (---)), it would make sense to treat the --- as literal
names.  A non-literal reference to a library could then be represented
by replacing the (---) with a single identifier, and that identifier
would have previously been bound to a suitably constructed value.  So in
the above, no shadowing would occur.

 > Local libraries: Assuming they have compound names also, presumably this
 > could be made to shadow, but it would require an extension to the
 > expander so that
 > it can bind not only identifiers but compound objects:
 >
 >   (let ()
 >    (library (r6rs base) ------)
 >    (local-import (r6rs base))
 >    ----)

I think Mike's point is a good one: a local module has different naming
requirements from top-level libraries.  In general, local module-like
capabilities may end up being somewhat orthogonal to the current library
mechanism.  PLT's units mechanism provides a kind of example of this.

Anton

_______________________________________________
r6rs-discuss mailing list
r6rs-discuss@lists.r6rs.org
http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss

Reply via email to