Libraries and hierarchies

Ketil Z. Malde ketil@ii.uib.no
05 Aug 2003 15:58:20 +0200


"Simon Peyton-Jones" <simonpj@microsoft.com> writes:

[...]

To my untrained ear, this sounds like a very reasonable plan.

> Manuel didn't like the fact that an import could mean "relative or
> absolute".  But presumably we want to continue to write little programs
> with three modules A, B, Main, and have Main just say 'import A'.  So
> presumably the current directory is always implicitly grafted into the
> module hierarchy at the root -- and that is all we need for making
> internal references within a package work out.

I presume that paths specified by -i (isn't it?) also will be grafted
into the root of the tree.

How do you deal with a file "Foo.lhs" declaring "module Bar.Zot.Foo",
say, in the current directory?  Is it legal to import it as "import
Foo"?  Or "import Bar.Zot.Foo"?  Both?

Is it really necessary and desirable to specify the whole path as part
of the module declaration? 

-kzm
-- 
If I haven't seen further, it is by standing in the footprints of giants