问题
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