Libraries and hierarchies

Simon Peyton-Jones
Wed, 6 Aug 2003 12:34:41 +0100

| Wouldn't one still want the module prefix + relative module name
| combination to produce unique module names?  So presumably the prefix
| should include the package name (though without a version number).

I don't think so.  Under our proposal, "original names" are globally
unique and stable, but the name for a module in a compilation depends on
what graftings you have done.

Maybe you are saying "what happens if you graft two modules from
different packages so that both modules get the same name?". For
example, suppose we have two packages

	dataOps-1.0	has a module with (relative) name A.B
	foo-2.7	has a module with (relative) name X.A.B

Suppose you graft in dataOps-1.0 at site DataOps.X
and foo-2.7 at site DataOps

Then "import DataOps.X.A.B" is ambiguous: it could mean either module.

That is plainly an error.  To be consistent with name clashes within
module, the complaint should probably only come if you actually try to
import it.

 Was that what you meant?