[Haskell-cafe] Best approach to avoid dependency hells

Ivan Perez ivanperezdominguez at gmail.com
Sat Dec 8 13:39:30 CET 2012


On 8 December 2012 03:12, Albert Y. C. Lai <trebla at vex.net> wrote:
>
> I do not understand the conflict. First you have GHC, and it comes with
> bytestring-0.9.2. Then one of two things happen, but I can't see a conflict
> either way:
>
> * You request A, but A should be fine with the existing bytestring-0.9.2.
> Then you request B, but B should be fine with the existing A you have, and
> indifferent about bytestring.

When you install A, you may not know that you'll need to depend on a
lower version of bytestring later on. Cabal will pick the highest
version available (0.10 if present). If a program you install later on
depends on A (needs  bytestring-0.10) and ghc (needs bytestring-0.9),
you'll have a conflict.

Using cabal-dev seems like a good approach. Just yesterday I was able
to install hoodle without problems (even though installing it with
cabal would have broken many packages). The fact that you can unpack
any package, fix the problems, add its path as source and install when
other packages depend on it saved me a lot of time already.



More information about the Haskell-Cafe mailing list