我正在使用2014-09-15发布的最新版本。
remote-repo: stackage:http://www.stackage.org/stackage/77b7fb7541411b7c50b0f7cdd3ac8ef833bcaeee
当我cabal install lens -v3
时,我得到一个未解决的依赖错误:
[_14] trying: transformers-compat-0.3.3.4 (dependency of lens-4.1.2.1)
[_15] trying: transformers-compat-0.3.3.4:-two
[_16] trying: transformers-compat-0.3.3.4:-three
[_17] next goal: transformers (dependency of lens-4.1.2.1)
[_17] rejecting: transformers-0.3.0.0/installed-16a..., 0.3.0.0 (conflict: transformers-compat-0.3.3.4:three => transformers>=0.4.1)
[_17] fail (backjumping, conflict set: lens, transformers, transformers-compat, transformers-compat-0.3.3.4:flag)
[_16] rejecting: transformers-compat-0.3.3.4:+three (manual flag can only be changed explicitly)
[_16] fail (backjumping, conflict set: lens, transformers, transformers-compat, transformers-compat-0.3.3.4:flag)
[_15] rejecting: transformers-compat-0.3.3.4:+two (manual flag can only be changed explicitly)
[__0] fail (backjumping, conflict set: lens, transformers, transformers-compat, transformers-compat-0.3.3.4:flag)
cabal: Could not resolve dependencies:
trying: lens-4.1.2.1 (user goal)
trying: transformers-compat-0.3.3.4 (dependency of lens-4.1.2.1)
next goal: transformers (dependency of lens-4.1.2.1)
rejecting: transformers-0.3.0.0/installed-16a..., 0.3.0.0 (conflict:
transformers-compat-0.3.3.4:three => transformers>=0.4.1)
Dependency tree exhaustively searched.
我认为使用叠加时这是不可能的?
我正在使用从网站上下载的ghc 7.8.3。唯一的全局软件包是我在安装ghc时安装的软件包:
~/.cabal> ghc-pkg list --global
/opt/ghc-7.8.3/lib/ghc-7.8.3/package.conf.d
Cabal-1.18.1.3
array-0.5.0.0
base-4.7.0.1
bin-package-db-0.0.0.0
binary-0.7.1.0
bytestring-0.10.4.0
containers-0.5.5.1
deepseq-1.3.0.2
directory-1.2.1.0
filepath-1.3.0.2
ghc-7.8.3
ghc-prim-0.3.1.0
haskeline-0.7.1.2
haskell2010-1.1.2.0
haskell98-2.0.0.3
hoopl-3.10.0.1
hpc-0.6.0.1
integer-gmp-0.5.1.0
old-locale-1.0.0.6
old-time-1.1.0.2
pretty-1.1.1.1
process-1.2.0.0
rts-1.0
template-haskell-2.9.0.0
terminfo-0.4.0.0
time-1.4.2
transformers-0.3.0.0
unix-2.7.0.1
xhtml-3000.2.1
我的用户包列表为空:
~/.cabal> ghc-pkg list --user
~/.cabal>
我在~/.cabal/packages/stackage/00-index.cache
里面偷看,发现只列出了0.3.0.0版本的变形金刚:
pkg: transformers 0.3.0.0 b# 184196
镜头-4.1.2.1要求变压器-compat-0.3.3.4,它需要变压器> = 0.4.1这让我感到困惑;当列出的唯一版本的变压器是0.3.0.0时,它将如何构建?
我安装了一些其他软件包,现在尝试安装镜头。当我尝试安装镜头成功时,这就是我已安装的内容。已经安装的变压器-compat-0.3.3.4必须与它有关。
~/.cabal> ghc-pkg list --user
Boolean-0.2.1
MemoTrie-0.6.2
NumInstances-1.3
QuickCheck-2.6
ReadArgs-1.2.1
aeson-0.7.0.4
attoparsec-0.10.4.0
base-unicode-symbols-0.2.2.4
basic-prelude-0.3.8
byteable-0.1.1
comonad-4.2.2
contravariant-0.6.1.1
distributive-0.4.4
dlist-0.7.1
exceptions-0.6.1
hashable-1.2.2.0
lifted-base-0.2.2.1
monad-control-0.3.3.0
mtl-2.1.3.1
nats-0.2
parallel-3.2.0.4
prelude-extras-0.4
primitive-0.5.2.1
profunctors-4.2.0.1
random-1.0.1.1
reflection-1.5.1
safe-0.3.8
scientific-0.2.0.2
semigroupoids-4.0.4
semigroups-0.15.3
split-0.2.2
stm-2.4.2
syb-0.4.1
system-filepath-0.4.12
tagged-0.7.2
text-1.1.0.0
transformers-base-0.4.3
transformers-compat-0.3.3.4
unordered-containers-0.2.4.0
utf8-string-0.3.8
vector-0.10.9.1
vector-space-0.8.7
vector-th-unbox-0.2.1.0
void-0.6.1
zlib-0.5.4.1
我认为transformers-compat-0.3.3.4能够安装,因为这些行可以在其cabal文件中找到。
flag three default: False manual: True description: Use
transformers 0.3. This should toggle on/off automatically.
library
build-depends:
base >= 4.3 && < 5
if flag(three)
hs-source-dirs: 0.3
build-depends: transformers >= 0.3 && < 0.4
我不知道cabal标志是如何工作的。我假设我安装的其他软件包知道设置flag = 3但镜头没有?这是出乎意料的,因为Edward Kmett是这两者的作者。
答案 0 :(得分:0)
变形金刚 - compat引起了很多问题,因为它触发了阴谋集依赖性解决方案中的错误。我会试着在堆叠中更好地固定变压器 - compat版本。我认为跟进这个问题会更容易在stackage github问题中处理。