Search code examples
haskellghccabalhaskell-platform

How to have base-4.8.1.0 on ghc-7.10.1?


Just installed ghc-7.10.1, followed by cabal-1.22.6 on Debian 7.8 (from sources). I'm following minimal installation of Haskell from http://www.extellisys.com/articles/haskell-on-debian-wheezy (I replaced 7.8.4 by 7.10.1, and downloaded latest haskell-platform-master from github)

But, whenever I try to install Haskell Platform, installation breaks minutes later at this point:

Building hptool-0.1...
Preprocessing executable 'hptool' for hptool-0.1...
***
*** Running hptool
***
# cabal (for build/package/hscolour-1.23/deps)
Error when running Shake build system:
* build-all
* build-source
* build/product/haskell-platform-7.10.2.tar.gz
* build/lists/build.packages
* build/package/hscolour-1.23/deps
Error computing dependencies of hscolour-1.23:
Resolving dependencies...

cabal: Could not resolve dependencies:
trying: hscolour-1.23 (user goal)
next goal: base (dependency of hscolour-1.23)
rejecting: base-4.8.0.0/installed-1b6..., 4.8.0.0, 4.7.0.2, 4.7.0.1, 4.7.0.0,
4.6.0.1, 4.6.0.0, 4.5.1.0, 4.5.0.0, 4.4.1.0, 4.4.0.0, 4.3.1.0, 4.3.0.0,
4.2.0.2, 4.2.0.1, 4.2.0.0, 4.1.0.0, 4.0.0.0, 3.0.3.2, 3.0.3.1 (global
constraint requires ==4.8.1.0)
Dependency tree exhaustively searched.

How to solve that?
How to have base 4.8.1.0?


Solution

  • Searching in the haskell-platform repository for mentions of base constraints, I found in hptool/src/Releases2015.hs a hp_7_10_2 value of type Release which seems to specify the 4.8.1.0 constraint, as well as an analogous hp2015_2_0_0 with a 4.8.0.0 constraint. That hp_7_10_2 value is used to specify the release to install in src/Main.hs, so I guess if you change that line to use hp2015_2_0_0 you will get dependencies that can be satisfied. The alternative would be installing GHC 7.10.2 (which includes base 4.8.1.0), which is still unreleased (however, there is a release candidate, and the official release should happen soon).