haskell堆栈异常缺少依赖项

时间:2016-11-22 20:11:26

标签: haskell cabal haskell-stack

我想将bound库添加到我的包依赖项中; 该项目完全用stack new初始化。 cabal文件中的条目如下所示:

executable DependendLambda-exe
  hs-source-dirs:      app
  main-is:             Main.hs
  ghc-options:         -threaded -rtsopts -with-rtsopts=-N
  build-depends:       base
                     , DependendLambda
                     , bound
  default-language:    Haskell2010

我收到以下错误消息:

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

In the dependencies for DependendLambda-0.1.0.0:
bound must match -any, but the stack configuration has no specified
version (latest applicable is 1.0.7)

Recommended action: 
try adding the following to your extra-deps in /home/MyProject/stack.yaml:
- bound-1.0.7

You may also want to try the 'stack solver' command
Plan construction failed.
Warning: build failed, but optimistically launching GHCi anyway
The following GHC options are incompatible with GHCi and have not been passed to it: -threaded
Using main module: 1. Package `DependendLambda' component exe:DependendLambda-exe with main-is file: /home/MyProject/app/Main.hs
Configuring GHCi with the following packages: DependendLambda
GHCi, version 8.0.1: http://www.haskell.org/ghc/  :? for help
<command line>: cannot satisfy -package bound
    (use -v for more information)

当我将依赖项添加到extra-deps时,它仍然失败:

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

In the dependencies for bound-1.0.7:
    binary-0.8.3.0 must match >=0.5 && <0.8 (latest applicable is 0.7.6.1)
    comonad-5 must match >=3 && <5 (latest applicable is 4.3)
    transformers-0.5.2.0 must match >=0.2 && <0.5 (latest applicable is 0.4.3.0)
needed due to DependendLambda-0.1.0.0 -> bound-1.0.7

Plan construction failed.
Warning: build failed, but optimistically launching GHCi anyway
The following GHC options are incompatible with GHCi and have not been passed to it: -threaded
Using main module: 1. Package `DependendLambda' component  
exe:DependendLambda-exe with main-is file: /home/MyProject/app/Main.hs
Configuring GHCi with the following packages: DependendLambda
GHCi, version 8.0.1: http://www.haskell.org/ghc/  :? for help
<command line>: cannot satisfy -package bound-1.0.7
    (use -v for more information)

stack solver命令也没有帮助......我错过了什么? 谢谢你的帮助!

0 个答案:

没有答案