[Haskell] Hierarchical module namespace extensionnotsufficiently flexible

Iavor Diatchki iavor.diatchki at gmail.com
Thu Mar 10 18:18:55 EST 2005


Hello,

On Thu, 10 Mar 2005 09:15:57 -0000, Simon Marlow <simonmar at microsoft.com> wrote:
> On the other hand, if you don't care about (2), can we forget about it
> and simplify the discussion?  I don't think anyone else was asking for
> it.
Sure, that's fine by me.  I wasn't asking for this feature either, I
was just enumerating different options as I think before making
extensions to the language (even small ones like this one) it is good
to know what the design space is.

Does anyone have any thoughts about what should happen in the following example?

module A (qualified module A) where { f = 'f' }
module B (module A) where { import A; ... }
module C  where { import B; ... }

How do we refer to 'f' in B?  I think the proposal suggests "A.f" or "A.A.f".
How do we refer to 'f' in C?  I think the proposal suggests that "f"
is not in scope in C.
The reason is that "B" does not export "f",  because there is no "f"
and "A.f" in scope.
It seems that we cannot re-export qualified exports using module-style
exports.   Is this the intended design choice, or am I missing
something?

-Iavor


More information about the Libraries mailing list