Haskell阴谋集团基地的依存冲突

时间:2018-06-20 01:38:53

标签: haskell cabal cabal-sandbox

出现一个问题,即阴谋集团的base.cabal文件中的依赖项冲突,看来我的base版本太高了,因此有一种降级方法我在base中的cabal sandbox软件包版本。

Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] trying: decafc-0.0.0 (user goal)
[__1] next goal: base (dependency of decafc)
[__1] rejecting: base-4.11.1.0/installed-4.1... (conflict: decafc => base>=4.5
&& <=4.9)
[__1] rejecting: base-4.11.1.0, base-4.11.0.0, base-4.10.1.0, base-4.10.0.0,
base-4.9.1.0, base-4.9.0.0, base-4.8.2.0, base-4.8.1.0, base-4.8.0.0,
base-4.7.0.2, base-4.7.0.1, base-4.7.0.0, base-4.6.0.1, base-4.6.0.0,
base-4.5.1.0, base-4.5.0.0, base-4.4.1.0, base-4.4.0.0, base-4.3.1.0,
base-4.3.0.0, base-4.2.0.2, base-4.2.0.1, base-4.2.0.0, base-4.1.0.0,
base-4.0.0.0, base-3.0.3.2, base-3.0.3.1 (constraint from non-upgradeable
package requires installed instance)
[__1] fail (backjumping, conflict set: base, decafc)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: base, decafc
Note: when using a sandbox, all packages are required to have consistent
dependencies. Try reinstalling/unrstering the offending packages or
recreating the sandbox.

还有另一个问题,例如,使用stack时,如果运行alex,如何向stack build添加一些标志,例如,阴谋指令是cabal install --alex-options="--ghc --template=\"$TOP/alex\""。那么如何让stack做同样的事情?

1 个答案:

答案 0 :(得分:2)

base依赖性表示它仅适用于4.5到4.9之间的版本。这意味着您可以使用此软件包的最新GHC是8.0.1,因为base是GHC附带的,无法升级。您可以自己破坏依赖性,但是由于base的更改,您可能不得不修复不再起作用的问题,或者可以安装旧版本的GHC。