A further pitfall I just discovered:
$ cabal install --dry cabal-install leksah-0.8.0.6
Resolving dependencies...
cabal: cannot configure cabal-install-0.8.2. It requires Cabal ==1.8.*
For the dependency on Cabal ==1.8.* there are these packages: Cabal-1.8.0.2,
Cabal-1.8.0.4 and Cabal-1.8.0.6. However none of them are available.
Cabal-1.8.0.2 was excluded because Cabal-1.6.0.3 was selected instead
Cabal-1.8.0.2 was excluded because ghc-6.10.4 requires Cabal ==1.6.0.3
Cabal-1.8.0.4 was excluded because Cabal-1.6.0.3 was selected instead
Cabal-1.8.0.4 was excluded because ghc-6.10.4 requires Cabal ==1.6.0.3
Cabal-1.8.0.6 was excluded because Cabal-1.6.0.3 was selected instead
Cabal-1.8.0.6 was excluded because ghc-6.10.4 requires Cabal ==1.6.0.3
That's on ghc-6.10.4 with Cabal-1.8.0.6.
However, trying to install cabal-install and leksah separately works quite well.
Indeed, they are already installed, but since they are not tracked by
ghc-pkg, cabal forgot that it installed them, and keeps forgetting
that (as I just discovered).
I believe the pitfall is that since cabal is trying to install both
packages at once, it is trying to figure out dependencies for them
together. The behavior might even be perfectly valid if there are
interdependencies between the two packages, but that's not the case
here; maybe cabal should not try to detect that the packages are not
related and can be installed separately. Or maybe, it should just
allow using two different versions of the same package, for packages
which are not linked together.
--
Paolo Giarrusso - Ph.D. Student
http://www.informatik.uni-marburg.de/~pgiarrusso/