Cabal can't install ghc-mod

362 Views Asked by At

I'm trying to install ghc-mod to use with Atom-Haskell (the ide-haskell package) in Atom, but for some reason my Cabal doesn't want to.

When I enter the command cabal install ghc-mod, I get the following errors in my terminal:

Resolving dependencies...
cabal.exe: Could not resolve dependencies:
[__0] trying: ghc-mod-5.8.0.0 (user goal)
[__1] trying: syb-0.7.1 (dependency of ghc-mod)
[__2] next goal: base (dependency of ghc-mod)
[__2] rejecting: base-4.14.1.0/installed-4.14.1.0 (conflict: ghc-mod =>
base<4.10 && >=4.6.0.1)
[__2] skipping: base-4.14.0.0, base-4.13.0.0, base-4.12.0.0, base-4.11.1.0,
base-4.11.0.0, base-4.10.1.0, base-4.10.0.0 (has the same characteristics that
caused the previous version to fail: excluded by constraint '<4.10 &&
>=4.6.0.1' from 'ghc-mod')
[__2] rejecting: base-4.9.1.0, base-4.9.0.0, base-4.8.2.0, base-4.8.1.0,
base-4.8.0.0, base-4.7.0.2, base-4.7.0.1, base-4.7.0.0, base-4.6.0.1,
base-4.6.0.0, base-4.5.1.0, base-4.5.0.0, base-4.4.1.0, base-4.4.0.0,
base-4.3.1.0, base-4.3.0.0, base-4.2.0.2, base-4.2.0.1, base-4.2.0.0,
base-4.1.0.0, base-4.0.0.0, base-3.0.3.2, base-3.0.3.1 (constraint from
non-upgradeable package requires installed instance)
[__2] fail (backjumping, conflict set: base, ghc-mod)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: base, ghc-mod, syb

I installed Cabal as part of the Haskell Platform, so to my understanding, it's a bit unusually configured. I don't have a %HOME%.cabal folder, and I don't know if that could be part of the issue?

I don't know a lot about how Cabal or ghc-mod work, so please let me know if you need any more info! Thanks for any help!

1

There are 1 best solutions below

0
On

You probably have a new version of base, (https://wiki.haskell.org/Base_package) where ghc-mod is only compatible with versions >=4.6.0.1 && <4.10 (https://hackage.haskell.org/package/ghc-mod). You'd have to downgrade.