[Haskell-cafe] The Haskell module landscape

Christopher Done chrisdone at googlemail.com
Sun Jul 4 10:23:25 EDT 2010

I was pondering how naming Haskell packages with a proper hierarchy is
quite important, and wondered what the general hierarchy of the
Hackage packages was like. So I grabbed the tarball of pakage
descriptions[1] from Hackage and ran a little messy Haskell script[2]
and got this list:


Here's a snippet:

hsdns:          ADNS
hsdns:          ADNS.Base
hsdns:          ADNS.Endian
hsdns:          ADNS.Resolver
cv-combinators: AI.CV.ImageProcessors
HOpenCV:        AI.CV.OpenCV.CV
HOpenCV:        AI.CV.OpenCV.CxCore
HOpenCV:        AI.CV.OpenCV.HighGui

It's interesting to see how there are quite a few packages that could
be easily put into the proper namesace, e.g. ADNS below should be in
the Network hierarchy. It's also cool to see clusters of separate
packages providing functionality for the same module, e.g. check out

special-functors:     Control.Applicative
base:                 Control.Applicative
applicative-extras:   Control.Applicative.Backwards
applicative-extras:   Control.Applicative.Compose
applicative-extras:   Control.Applicative.Error
InfixApplicative:     Control.Applicative.Infix
category-extras:      Control.Applicative.Parameterized
action-permutations:  Control.Applicative.Permutation
applicative-extras:   Control.Applicative.State
yjtools:              Control.Applicative.Tools
unicode-symbols:      Control.Applicative.Unicode
base-unicode-symbols: Control.Applicative.Unicode
Control.Concurrent also has a lot going on inside it. There are quite
a lot of packages under Network, too.

One idea: Hackage could have an additional page which displays this,
fully linked up to the packages in question, with an MSDN-style
complete collapsible/expandable module hierarchy menu on the left and
documentation on the right. I'm not saying that's the right way to do
it, but it certainly makes for fun browsing for Haskell's entire open
source codebase. (It would also encourage library writers to put their
libraries in a useful namespace.)

[1]: http://hackage.haskell.org/packages/archive/00-index.tar.gz
[2]: http://gist.github.com/463472

More information about the Haskell-Cafe mailing list