Proposal: Reserved module namespace for packages on Hackage

David Menendez dave at
Mon Aug 18 23:48:28 EDT 2008

On Mon, Aug 18, 2008 at 9:24 PM, Duncan Coutts
<duncan.coutts at> wrote:
> On Mon, 2008-08-18 at 19:32 -0400, David Menendez wrote:
>> In the interests of reducing module name collisions, I suggest
>> reserving part of the module name space for individual packages on
>> Hackage. Specifically, I'm suggesting that a new top-level module
>> name, "Lib", be added to the module naming conventions, and that the
>> children of "Lib" be reserved for the Hackage package with the same
>> name. That is, "Lib.Foo" and "Lib.Foo.*" would be reserved for the
>> package "Foo" on Hackage.
> Note that this is entirely contrary to the existing (and well
> established) convention of naming according to the purpose / content of
> the module rather than the name of the implementation.
> What I mean is, it's a significant change.

Is it?

Look at the XML category at Hackage.

formlets - no common prefix
generic-xml - all modules prefixed with Xml
HaXml - every module is prefixed with Text.XML.HaXml
hexpat - both modules are prefixed with Text.XML.Expat
HXQ - one module, prefixed with Text.XML.HXQ
hxt - 95 of 113 modules are prefixed with Text.XML.HXT
libxml - all modules prefixed with Text.XML.LibXML
tagsoup - 7 of 8 modules prefixed with Text.HTML.TagSoup
xml - all modules prefixed with Text.XML.Light

Selecting things semi-randomly from the parser category, I see:

attoparsec - all modules prefixed with Data.ParserCombinators.Attoparsec
binary - all modules prefixed with Data.Binary
binary-strict - all modules prefixed with Data.Binary.Strict
bytestringparser - all modules prefixed with Data.ParserCombinators.Attoparsec
PArrows - all modules prefixed with Text.ParserCombinators.PArrow
Parsec - all modules prefixed with Text.ParserCombinators.Parsec
parsely - all modules prefixed with Text.ParserCombinators.Parsely
polyparse - no common prefix
uulib - all modules prefixed with UU

To me, it looks like a common pattern is to give most or all of the
modules in a package a common prefix consisting of a general
classification and the package name (or a close variant). All I'm
suggesting is to give library authors the option to drop the
classification part. Trying to create a collaborative, hierarchical
classification system is a sucker's game. That's why Hackage itself
uses tags.

Dave Menendez <dave at>

More information about the Libraries mailing list