【发布时间】:2015-05-12 06:03:46
【问题描述】:
我正在尝试安装 lens 包以使用 haskell。
$ haste-inst install lens
我收到以下错误:
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: base-4.6.0.1/installed-4.6... (user goal)
trying: containers-0.4.1.0/installed- (user goal)
trying: lens-4.9.1 (user goal)
next goal: template-haskell (dependency of lens-4.9.1)
rejecting: template-haskell-2.10.0.0 (conflict:
base==4.6.0.1/installed-4.6..., template-haskell => base==4.8.*)
rejecting: template-haskell-2.9.0.0 (conflict: base==4.6.0.1/installed-4.6...,
template-haskell => base==4.7.*)
rejecting: template-haskell-2.8.0.0 (conflict: containers==0.4.1.0/installed-,
template-haskell => containers==0.5.*)
rejecting: template-haskell-2.7.0.0 (conflict: base==4.6.0.1/installed-4.6...,
template-haskell => base==4.5.*)
rejecting: template-haskell-2.6.0.0 (conflict: base==4.6.0.1/installed-4.6...,
template-haskell => base==4.4.*)
rejecting: template-haskell-2.5.0.0 (conflict: base==4.6.0.1/installed-4.6...,
template-haskell => base==4.3.*)
rejecting: template-haskell-2.4.0.1 (conflict: base==4.6.0.1/installed-4.6...,
template-haskell => base==4.2.*)
rejecting: template-haskell-2.4.0.0 (conflict: base==4.6.0.1/installed-4.6...,
template-haskell => base>=3 && <4.3)
rejecting: template-haskell-2.3.0.1, 2.3.0.0, 2.2.0.0 (conflict: lens =>
template-haskell>=2.4 && <2.11)
Backjump limit reached (change with --max-backjumps).
Note: when using a sandbox, all packages are required to have consistent
dependencies. Try reinstalling/unregistering the offending packages or
recreating the sandbox.
我认为沙盒“注意”具有误导性。沙盒是新的,base 无论如何都不能存在于沙盒中。
是什么决定了加速基地的版本?用 cabal(对于 haskell)安装镜头效果很好:
cabal install lens
编辑:
lens-family 到目前为止作为替代品效果很好。
【问题讨论】:
-
哦,我明白了,here's what determines the version of haste's version of base - 基础是从原始代码库中合并和修补的。
-
所以“明显”的问题是支持提供的基本包的模板 haskell 版本不支持已安装的容器包。看来我不允许在沙箱内重新安装。在外面它似乎工作..
-
嗯,我认为解决方案是在匆忙时避免沙箱。我稍后再试。
-
为什么要安装容器 0.4.1.0?您肯定想要至少 0.5.0.0,这是 GHC 7.6 附带的版本吗?
-
不要安装任何容器包,只用GHC自带的那个。 (或者是急速,我猜...不确定包管理如何与急速一起工作,但一般来说,您应该只使用编译器附带的模板-haskell,并且由于容器是模板-haskell 的依赖项,因此同样适用容器。)
标签: haskell haskell-lens haste