-
Go to
~/.stack/global-project/stack.yaml
and change theresolver:
section tolts-10.3
. -
Add:
- https://hackage.haskell.org/package/ghc-mod-5.9.0.0/candidate/ghc-mod-5.9.0.0.tar.gz
- cabal-helper-0.8.0.0
- extra-1.5.3
- monad-journal-0.7.2
- optparse-applicative-0.13.2.0
- either-4.4.1.1
to the extra-deps:
section of the stack.yaml file.
- Run
stack build ghc-mod
- Run
stack install ghc-mod
- Make sure
~/.local/bin
is in your path. - Run
ghc-mod version
to verify the version of ghc-mod. If it still shows an older version, then look into other paths like~/.cabal/bin
that might overlap with the installed ghc-mod and remove the conflicting ghc-mod binary.
The
ghc-mod
exec gets installed in a stack masked location and is only accessible viastack exec -- ghc-mod
.