How to install ghc-mod using cabal

456 Views Asked by At

I am trying to install ghc-mod. Running MacOS Mojave 10.14.1. Right now, when running cabal install ghc-mod I get:

clang: warning: argument unused during compilation: '- nopie' [-Wunused-command-line-argument]
Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] trying: ghc-mod-5.8.0.0 (user goal)
[__1] trying: syb-0.7 (dependency of ghc-mod)
[__2] next goal: base (dependency of ghc-mod)
[__2] rejecting: base-4.11.1.0/installed-4.1... (conflict: ghc-mod =>
   base<4.10 && >=4.6.0.1)
[__2] rejecting: 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, 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 haven't found anything on this particular failure. So I tried installing happy which "may be needed for installing" according to this.

But doing so I got the following warning:

Warning: could not create a symlink in /Users/myname/.cabal/bin for
happy because the file exists there already but is not managed by cabal. You
can create a symlink for this executable manually if you wish. The executable
file has been installed at /Users/myname/.cabal/bin/happy

How could I do so? Would this even resolve my prior issue?

I also tried using stack install ghc-mod but I'm getting Plan construction failed.

GHC, Cabal and Stack are all updated.

0

There are 0 best solutions below