Haskell 在构建中包括美味快速检查的问题
我是新手 我有一个堆栈项目,我想使用tasty quickcheck。当我向package.yaml添加Haskell 在构建中包括美味快速检查的问题,haskell,haskell-stack,tasty,Haskell,Haskell Stack,Tasty,我是新手 我有一个堆栈项目,我想使用tasty quickcheck。当我向package.yaml添加tasty quickcheck时,stack要求我将其添加到stack.yaml的额外deps部分。在将tasty-quickcheck-0.10.1.1添加到额外的deps堆栈后,要求我向我添加的额外deps添加大约十几个包 现在,当我尝试进行堆栈构建时,我遇到了以下错误 stack build Error: While constructing the build plan, the
tasty quickcheck
时,stack要求我将其添加到stack.yaml的额外deps部分。在将tasty-quickcheck-0.10.1.1
添加到额外的deps堆栈后,要求我向我添加的额外deps添加大约十几个包
现在,当我尝试进行堆栈构建时,我遇到了以下错误
stack build
Error: While constructing the build plan, the following exceptions were encountered:
In the dependencies for transformers-compat-0.6.5:
transformers-0.5.6.2 from stack configuration does not match >=0.3 && ==0.2.*
needed due to tic-tac-toe-0.1.0.0 -> transformers-compat-0.6.5
Some different approaches to resolving this:
* Set 'allow-newer: true'
in /Users/home/.stack/config.yaml to ignore all version constraints and build anyway.
Plan construction failed.
我的package.yaml如下所示
...
dependencies:
- base >= 4.7 && < 5
- vector
- mtl
- tasty-quickcheck
...
...
resolver: ghc-8.8.3
extra-deps:
- vector-0.12.1.2
- primitive-0.7.0.1
- tasty-quickcheck-0.10.1.1
- random-1.1
- tagged-0.8.6
- tasty-1.3.1
- QuickCheck-2.14
- ansi-terminal-0.10.3
- async-2.2.2
- clock-0.8
- optparse-applicative-0.15.1.0
- unbounded-delays-0.1.1.0
- wcwidth-0.0.2
- ansi-wl-pprint-0.6.9
- colour-2.3.5
- hashable-1.3.0.0
- splitmix-0.0.5
- transformers-compat-0.6.5
...
我有两个问题
如何修复上述错误
stack通常会告诉您添加十几个依赖项,只是为了得到像tasty quickcheck这样的单个包?对我来说这听起来不太好。这是大多数软件包的标准吗李>
引用评论:
在堆栈中指定了哪个解析器
(或快照
).yaml
@duplode它是分解器:ghc-8.8.3
在这种情况下,您可能不想使用ghc-*
解析器。它们只指定GHC版本(以及与GHC捆绑在一起的少量软件包的版本),这就是为什么您必须将所有其他内容添加到额外dep
。将resolver
更改为lts-16.0
(最新的Stackage lts),从stack.yaml
文件中删除额外的dep
;这应该足以让事情正常工作。在堆栈中指定了哪个解析器
(或快照
)?(@atis:AFAIK、堆栈更新
和堆栈升级
不会更新快照;这应该在stack.yaml
文件中更改。)@duplode它是解析器:ghc-8.8.3
。