[Haskell-cafe] What's in a name?

wren ng thornton wren at freegeek.org
Sat Aug 16 00:27:44 EDT 2008

David Menendez wrote:
> On Fri, Aug 15, 2008 at 7:24 PM, wren ng thornton <wren at freegeek.org> wrote:
>> (( For readers who don't want to slog through the rest of this post, the
>> conclusion is that I feel an agile packaging system is an imperative, as
>> discussed above. The trick is finding a way to be agile without creating a
>> maintenance and conflict nightmare. But given the imperative: baby,
>> bathwater, etc. ))
> Have you seen the PackageMounting proposal?
> <http://hackage.haskell.org/trac/ghc/wiki/PackageMounting>
> Essentially, each package would get its own hierarchy, which would
> then be attached to the larger module hierarchy at compile-time
> according to compiler options, or Cabal data, or methods as yet
> unseen. If, for some reason, you need to import two versions of the
> same package, or two packages that have a module name collision, you
> can change the default mounting point for one or both.

I hadn't seen it. It looks pretty nice. It reminds me of the recent 
discussion about hierarchical imports for the Gtk library.[1]

A feature that's typically nice in grafting systems is to allow 
re-grafting (and pruning), so that after a package is mounted 
subpackages can be moved around (or removed). These features add 
complication to building the right tree before linking, but it adds a 
great deal of power and flexibility.

A typical use case is when your project is using some other large 
project and you want to mark certain parts of that project as 
deprecated, unsafe, overridden, etc so that your own code doesn't 
accidentally use it. Defensive programming and all that.

Of course, used improperly, it also lets you create byzantine structures 
that channel mind-bending energies that keep systems administrators 
tossing and turning at nights.


Live well,

More information about the Haskell-Cafe mailing list