module namespaces

Simon Marlow
Wed, 28 Feb 2001 02:42:38 -0800

Johannes Waldmann writes:
> This leads to another question - during the linking stage: 
> when should the compilation manager look for a single object file, 
> and when should it expect an archive?
I'll explain briefly how GHC would handle this.

GHC has a concept of a "package", which is basically a compiled unit
consisting of libraries and interfaces (not necessarily Haskell).  For
each package, the compiler has a specification telling it what the
interface search path for this package is, what the libraries are called
(and where they live), and what other packages this one depends on.

In the hierarchical module scheme, the only thing that changes is that
the search paths are now all "roots" of the hierarchical namespace (see
my previous message).