Cabal vs Haskell [sic]

ross at soi.city.ac.uk ross at soi.city.ac.uk
Fri Apr 22 19:21:28 EDT 2005


On Fri, Apr 22, 2005 at 11:28:21PM +0100, Simon Peyton-Jones wrote:
> And this observation points towards a simpler solution: rather than
> invisibly pre-pend the package name, just get the programmer to do so.
> So package P exposes a module called P.M and package Q exposes Q.M.  All
> P's internal modules are called P.something, and similarly for Q.  (We
> rely on some social mechanism for allocating new package names, as now.)
> Now of course you can import P.M and Q.M in a single module.

This would obscure the hierarchy a bit.  A common current practice is a
variant of this: modules either have allocated names or their names
have the form

	allocated prefix + proper name + whatever you like

e.g. Graphics.Rendering.OpenGL.GL.Texturing.Queries -- it seems to work
pretty well, and should scale, as long as the proper names are distinct,
e.g. package names or otherwise allocated.


More information about the Libraries mailing list