Search code examples
haskellghccabal

Can not build vty-ui on Arch Linux with GHC 7.8


Just updated the GHC and cabal couple of days ago and now a lot of pacakages can not be built.

$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.8.2

$ cabal --version
cabal-install version 1.18.0.3
using version 1.18.1.3 of the Cabal library 

I can install vty but not vty-ui. I have the following error:

$ cabal install vty-ui
Resolving dependencies...
In order, the following would be installed:
containers-0.3.0.0 (latest: 0.5.5.1) (new version)
mtl-1.1.1.1 (latest: 2.2.0.1) (new version)
QuickCheck-2.1.2 (latest: 2.7.3) (new package)
parallel-1.1.0.1 (latest: 3.2.0.4) (new version)
parsec-3.1.5 (reinstall) changes: mtl-2.1.3.1 -> 1.1.1.1
pcre-light-0.3.1.1 (latest: 0.4.0.2) +small_base (new package)
semigroups-0.13.0.1 (new package)
void-0.6.1 (new package)
MemoTrie-0.6.2 (new package)
vector-space-0.5.9 (latest: 0.8.6) (new package)
vty-4.2.1.0 (latest: 4.7.5) (new version)
vty-ui-0.4 (latest: 1.6.1) (new package)
cabal: The following packages are likely to be broken by the reinstalls:
vty-4.7.5
Use --force-reinstalls if you want to install anyway.

Solution

  • I have the same setup and tried downloading the latest tarball and modifying vty-ui.cabal to bump up the versions, e.g.

    unix >= 2.4 && < 2.8
    array >= 0.3.0.0 && < 0.6.0.0
    QuickCheck >= 2.4 && < 2.8
    

    And then did a "cabal install". I think upstream simply put the upper limits in for safety's sake. I didn't down grade any packages and it seems to work fine. I did this a few days ago and am going by memory. YMMV.