[Haskell] Hierarchical module namespaceextensionnotsufficiently flexible

Simon Peyton-Jones simonpj at microsoft.com
Fri Mar 11 05:56:14 EST 2005

| 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
| 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.

Correct, according to the rules I suggested. 

| It seems that we cannot re-export qualified exports using module-style
| exports.   Is this the intended design choice, or am I missing
| something?

Hmm.  If you said

	module B( module A.A ) where { import A; ... }

then since A.A.f and A.f are in scope, presumably A.f is exported, just
as it was from A.


More information about the Libraries mailing list