[Haskell-cafe] A small step towards solving cabal hell.

timothyhobbs at seznam.cz timothyhobbs at seznam.cz
Sun Nov 18 16:15:19 CET 2012

Well in some cases, it might not be easy to break up the libraries.  If 
there is sufficient mutual dependency, doing so won't even help the 
situation.  However, I already looked at the code to some large libraries, 
such as xmonad-contrib, and gtk2hs and am certain that no code modifications
are needed for these libraries to be broken into more manageable "books".  
Often times, like is the case with xmonad-contrib and gtk2hs you have a core
library that is required by a large "cluster" of smaller modules.  But those
smaller modules are not mutually required between themselves.  From a 
technical standpoint, it might be nice to have a way to declare such a 
grouping within hackage or cabal, but no technical change is necessary for 
the philosophical change I am recommending.

One thing I certainly don't want to do, is to "strong arm" library 
maintainers into breaking up their mega-packages into more easily maintained
parts ;)  This has to be a decision made by the individual package 
maintainers, rather than some "policy" that comes down from "those who know 
best" upon the shoulders of the hard working members of our community...


---------- Původní zpráva ----------
Od: Alfredo Di Napoli <alfredo.dinapoli at gmail.com>
Datum: 18. 11. 2012
Předmět: Re: [Haskell-cafe] A small step towards solving cabal hell.
Hi Tim,
it seems a good idea, although I hardly believe such isolation is achievable
in practice. Just a feeling, though :)

However, I really hope we, as a community, will be able to finally fix the 
Cabal Hell. It's a topic with a lot of hype lately,

but few "practical, hands dirty" approaches :)



On 18 November 2012 13:33, <timothyhobbs at seznam.cz
(mailto:timothyhobbs at seznam.cz)> wrote:
I've read a lot of negative regarding the problems with cabal and hackage.
I've written quite a few of them myself.

I want to propose a simple change in philosophy of packages.

Haskell has inherited a philosophy from the imperative world,
that there are two types of packages:
Libraries and applications.

Libraries are big collections of modules.
Applications are big collections of modules.

There is a difference from the perspective of the build system.  

Applications are big collections of modules that belong together and 
mutually rely upon each other for the application to work. Such that if one 
module is missing, the application cannot build and thus cannot do useful 
tasks.  If an application doesn't build, then the maintainer has to go and 
fix that problem.  This isn't perfect, I do not solve this problem in this 

Libraries don't always have this property.
For example, XMonad.Layout.Column
has no mutual dependency on XMonad.Layout.Circle

This is a feature of libraries that can and should be taken advantage of 
wherever possible :)

We can and should,
break up libraries into "books".

I hold this opinion,
because libraries are hard to maintain.

If xmonad-contrib refuses to build,
I open up it's source code,
and see some hundred modules.

I cannot,
as a non-xmonad developer,
imagine myself fixing such a large library.
But if it was just one small module from that library I wanted,
and it refused to build,
and I opened it up,
and there were just 3 files there.
I wouldn't feel so overwhelmed.

I would fix the problem myself.

What I'm trying to say,
is that "books"
(small packages containing 3 modules or less)
are so easy to maintain,
that they really need no maintainer at all.
Any idiot can fix one.

But libraries,
with their hundreds of modules,
and seemingly endless dependencies,
Can be much harder to maintain,
and require a knowledgeable maintainer.

So lets stop publishing libraries,
and maintaining libraries,
and listening to people crying when libraries don't build,
and lets start writing books,
and publishing really small packages,
that are so simple anyone can fix them when they break
even when they have no in depth knowledge of the package.

Lets make a new guideline for "libraries"
that if it is possible to split a library into two or more,
non-mutually dependent parts,
than we *should* split them such.



I noticed that yesod is already a collection of "books",
but it appears to me, that these packages are STILL mutually dependent :(

Haskell-Cafe mailing list
Haskell-Cafe at haskell.org(mailto:Haskell-Cafe at haskell.org)


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20121118/d9a93a4d/attachment.htm>

More information about the Haskell-Cafe mailing list