
Malcolm Wallace wrote:
Aaron Denney
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
I've digested this, and I hope can regurgitate the key points for anyone wishing to grasp it quickly. Please correct me if I get anything wrong: - the proposal is to let you specify grafting in the source code - you graft a *sub-hierarchy* of a package anywhere in the global module namespace (the sub-hiearchy bit is new, I haven't seen this proposed before). - you can also graft a sub-hierarchy of a package onto the *current module*, so that it becomes available when importing this module. This is new too. Personally I'm not convinced the extra generality of grafting sub-hierarchies is necessary. The re-export idea is interesting, though. Cheers, Simon