Installing specific versions via stack

2.3k Views Asked by At

So I suppose the problem I'm really trying to solve is that when I run ghc-mod I get this error:

CabalHelper/Licenses.hs|53 col 18 error| error: Ambiguous occurrence ‘lookupInstalledPackageId’

I found this relevant issue: https://github.com/DanielG/ghc-mod/issues/772

Where it suggests installing ghc-mod from github, I'd like to do everything via stack if possible (just to avoid mixing too many environments), but I couldn't find a way to specify either a version or how to specify a github repo with stack install.

I also continually run into errors from stack saying that it found version x when version y was required, but I can't seem to figure out how to get it to install version x anyways.

Anyone know how I can install the latest version of ghc-mod? Preferably with stack.

1

There are 1 best solutions below

0
Bart Louwers On

This was implemented recently. https://github.com/commercialhaskell/stack/issues/2028

Just use:

stack install ghc-mod-5.0.0

or any other version you like.