Proposal: module namespaces.

Christian Brolin Christian.Brolin@carmen.se
Wed, 28 Feb 2001 11:44:58 +0100


Marcin 'Qrczak' Kowalczyk wrote:
> 
> On Wed, 28 Feb 2001, Christian Brolin wrote:
> 
> > What?? The compiler knows the full name of the module without the module
> > clause.
> 
> It does not. File A/B/C/D.hs can be module A.B.C.D, or module B.C.D which
> happened to be placed in a directory A, or C.D etc. It's ambiguous.

Only if you give the compiler include pathes to both ~ and ~/A, where ~
is the directory containing your A.

> I'm not saying that I want to have to write full paths, but I see no other
> choice.
> 
> > The dots was just my suggestion of a syntax for relative addresses.
> > One dot: Relative to the parent of this module.
> > Two dots: Relative to this module.
> 
> It's confusing. If at all, it should be the opposite, analogous
> to . and .. directories. But it doesn't look clear either.

I just want to left out the redundant information, and . and .. are what
remain.
import .D2 -- import [A.B.C].D2
import ..E -- import [A.B.C].[D].E

-- 
Christian Brolin