package mounting

Simon Peyton-Jones simonpj at microsoft.com
Mon Oct 30 03:51:49 EST 2006


| > http://hackage.haskell.org/trac/ghc/wiki/PackageMounting
| 	
| It looks nice, but don't you think the -package-base flag ought to
| take both the package name *and* the mountpoint?
| 
| Otherwise, this looks like what I've wanted all along, if only I knew
it ;-).

I think most of you know that GHC 6.6 made (IHMO) a significant step
forward, by allowing a program to contain multiple modules with the same
name, if they are from different packages.  That means that package
authors can choose module names freely, rather than worry about
accidentally colliding with other packages.  (We'd regard it as
unacceptable if the local variables of a function could not have the
same name as the local variables of another procedure!)

That still leaves an open question, not resolved by GHC 6.6: what to do
if you want to import module M from two different packages into the same
module?  (A related question is when you have to decide what your module
is called.)  This can be tackled in at least three different ways, one
being Frederik's proposal.  Simon and I are not wedded to any particular
one, and we'd welcome a consensus on what to do.

The state of play is summarised here
	http://hackage.haskell.org/trac/ghc/wiki/GhcPackages
which includes a link to the package-mounting proposal.

If you care about this stuff, do debate it -- and please record points
that survive a bit of discussion on the Wiki pages.  None of this is
very hard to implement; the difficulty is settling on a good design.  

Simon



More information about the Libraries mailing list