无法在本地安装ghc-mod

时间:2018-03-05 05:37:53

标签: haskell ghc ghc-mod

我的MacOS上安装了ghc 8.2.1。但是我的全局ghc-mod仍在使用8.0.2,因为我最近将ghc升级到8.2.1。我想升级ghc-mod。我尝试了以下命令,它返回错误如下:

▸ ghc --version
The Glorious Glasgow Haskell Compilation System, version 8.2.1

▸ ghc-mod --version
ghc-mod version 5.7.0.0 compiled by GHC 8.0.2

▸ stack build --copy-compiler-tool ghc-mod hoogle weeder

Error: While constructing the build plan, the following exceptions were encountered:

In the dependencies for ghc-mod-5.8.0.0:
    Cabal-2.0.1.1 from stack configuration does not match >=1.18 && <1.25 (latest matching version is 1.24.2.0)
    base-4.10.1.0 from stack configuration does not match >=4.6.0.1 && <4.10 (latest matching version is 4.9.1.0)
    cabal-helper must match <0.8 && >=0.7.3.0, but the stack configuration has no specified version (latest matching version is 0.7.3.0)
    extra-1.6.2 from stack configuration does not match <1.6 && >=1.4 (latest matching version is 1.5.3)
    ghc-8.2.2 from stack configuration does not match >=7.6 && <8.2
    monad-journal-0.8.1 from stack configuration does not match <0.8 && >=0.4 (latest matching version is 0.7.2)
    optparse-applicative-0.14.0.0 from stack configuration does not match >=0.13.0.0 && <0.14 (latest matching version is 0.13.2.0)
needed since ghc-mod is a build target.

Some potential ways to resolve this:

  * Recommended action: try adding the following to your extra-deps in /Users/leo/zhangchiqing/hello/stack.yaml:

- Cabal-1.24.2.0
- base-4.9.1.0
- cabal-helper-0.7.3.0
- extra-1.5.3
- monad-journal-0.7.2
- optparse-applicative-0.13.2.0

  * Set 'allow-newer: true' to ignore all version constraints and build anyway.

  * You may also want to try using the 'stack solver' command.

Plan construction failed.

0 个答案:

没有答案