Packages and modules

Malcolm Wallace Malcolm.Wallace at cs.york.ac.uk
Thu Jul 6 09:51:24 EDT 2006


Aaron Denney <wnoise at ofb.net> wrote:

> >> Package names should never appear in source files IMHO.
> >
> > I tend to the opposite view.
> 
> Then, as John points out, how is package Foo module A.B.C and package
> Bar module A.B.C any different than modules Foo.A.B.C and Bar.A.B.C?

I have great sympathy with this view - that packages are little
different from a top-level name in the hierarchy.

But Simon PJ's comment (on the wiki page) about the difference between
specifying the _purpose_ of a module in its name, and the _provenance_
of a module in its package identifier, was very convincing.

I have added (yet another) alternative proposal, to the wiki here:
    http://hackage.haskell.org/trac/ghc/wiki/GhcPackagesWithGrafting

The details overlap significantly with the current proposals, but the
main contribution I am trying to bring to the table is the (old but
never implemented) idea of grafting a sub-hierarchy at an arbitrary
location.  This idea has a close relationship with specifying what
package a module should come from.  So, I have tried to combine the two.

Regards,
    Malcolm


More information about the Libraries mailing list