cabal install — global constraint requires installed instance

浪尽此生 提交于 2019-12-12 10:51:59

问题


My cabal dependencies are listed as

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

i did,

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

To overcome dependency conflicts, i am using sandbox installation. But still, cabal is talking about some global constraints which is confusing for me.

Cabal dependency tree resolution gets screwed as,

    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)

回答1:


You should have a cabal.config file in your current directory. Open it with any text editor and serach for the transformers installed string.

Once you have found it, replace it with transformers ==0.4.3.0 or any other version you like.



来源:https://stackoverflow.com/questions/28745558/cabal-install-global-constraint-requires-installed-instance

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!