Libraries and hierarchies

Simon Marlow simonmar@microsoft.com
Mon, 4 Aug 2003 09:44:14 +0100


=20
> Simon Marlow writes:
>  :
>  | After installing the library, the tree of modules it contains will
>  | be grafted into the global hierarchy at possibly many places, and
>  | the modules can then only be imported by uttering their full path
>  | names in the global hierarchy.
>=20
> Hi.
>=20
> If that makes a module (module M where data T) appear twice in the
> global hierarchy (at A and B), do the types A.M.T and B.M.T become
> distinct from each other?
>=20
> Sorry if that's an obtuse question.  I hope it has a short answer.

That's a good question.  The short answer is "no".

Unfortunately that's made me realise that the simple implementation
schemes we proposed won't work.  The compiler needs to internally use
module names which consist of a pair of (package name, relative module
name), so that it can identify modules from the same package but
different parts of the hierarchy.  This won't be too difficult for GHC,
but I fear it will be more of an upheaval for Hugs.

Cheers,
	Simon