我的阴谋依赖列为

base ==4.6.*, containers ==0.5.*, bytestring ==0.10.*, binary ==0.5.*, parsec ==3.1.*

我做到了
cabal sandbox init
wget http://www.stackage.org/lts/cabal.config
cabal install --only-dependencies

为了克服依赖性冲突,我正在使用沙盒安装。但是,cabal仍然在谈论一些使我感到困惑的全局约束。

阴谋依赖树的分辨率被搞砸了,因为
    trying: parsec-3.1.8 (dependency of myproj-0.1.0.0)
next goal: mtl (dependency of parsec-3.1.8)
rejecting: mtl-2.2.1, 2.2.0.1, 2.2 (global constraint requires ==2.1.3.1)
trying: mtl-2.1.3.1
next goal: transformers (dependency of mtl-2.1.3.1)
rejecting: transformers-0.4.2.0, 0.4.1.0, 0.3.0.0, 0.2.2.1, 0.2.2.0, 0.2.1.0,
0.2.0.0, 0.1.4.0, 0.1.3.0, 0.1.1.0, 0.1.0.1, 0.1.0.0, 0.0.1.0, 0.0.0.0,
0.4.0.0 (global constraint requires installed instance)

最佳答案

您应该在当前目录中有一个cabal.config文件。用任何文本编辑器打开它,并搜索transformers installed字符串。

找到它后,将其替换为transformers ==0.4.3.0或您喜欢的任何其他版本。

关于haskell - cabal install ---全局约束要求已安装实例,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/28745558/

10-11 22:34
查看更多