Libraries and hierarchies

Simon Marlow
Fri, 8 Aug 2003 15:38:55 +0100

> Would you mind illustrating the source-to-source transformation on
> a small example?  Suppose there's a package foo with a module
> 	module C where f =3D 'a'
> that this package is grafted in at both A.B and X, and=20
> there's a module
> 	module Foo (f) where
> 	import A.B.C (f)
> 	import X.C (f)

One possible transformation is this:

   module A.B.C where f =3D 'a'
   module X.C (module A.B.C) where import A.B.C

> I also can't see much to gain from local graftings.  But that=20
> leaves us wanting each combination of
> 	default root for package + local module name
> unique across all packages, doesn't it?

No - we don't want globally-unique module names (that's what we were
trying to solve in the first place).  We therefore do want local

There are good uses for packages which overlap in their default
installation - versioning is one example.