2

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.

sjakobi
  • 3,546
  • 1
  • 25
  • 43
Chris Penner
  • 1,881
  • 11
  • 15
  • Specify the github repo in your [`stack.yaml`](https://github.com/commercialhaskell/stack/blob/master/doc/yaml_configuration.md) file (see esp. "complex package locations"). – user2407038 Sep 16 '16 at 22:52
  • 1
    I'd like to download it as a binary for global use on my system, any ideas there? – Chris Penner Sep 17 '16 at 02:33

1 Answers1

3

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.

Bart Louwers
  • 873
  • 9
  • 28