gpt4 book ai didi

Haskell fay 安装失败

转载 作者:行者123 更新时间:2023-12-02 07:38:12 25 4
gpt4 key购买 nike

我正在尝试安装 fay但是 src 编译失败了

$ cabal install fay
...
Preprocessing executable 'fay' for fay-0.10.1.0...
[ 1 of 14] Compiling Data.List.Extra ( src/Data/List/Extra.hs, dist/build/fay/fay- tmp/Data/List/Extra.o )
[ 2 of 14] Compiling System.Process.Extra ( src/System/Process/Extra.hs, dist/build/fay/fay-tmp/System/Process/Extra.o )
...
[13 of 14] Compiling Language.Fay ( src/Language/Fay.hs, dist/build/fay/fay-tmp/Language/Fay.o )
[14 of 14] Compiling Main ( src/Main.hs, dist/build/fay/fay-tmp/Main.o )

src/Main.hs:89:55:
Couldn't match expected type `Either ParseError (Maybe String)'
with actual type `Maybe b0'
Expected type: b0 -> Either ParseError (Maybe String)
Actual type: b0 -> Maybe b0
In the first argument of `(.)', namely `Just'
In the first argument of `reader', namely `(Just . Just)'

src/Main.hs:96:35:
Couldn't match expected type `Either ParseError a0'
with actual type `Maybe b0'
Expected type: b0 -> Either ParseError a0
Actual type: b0 -> Maybe b0
In the first argument of `(.)', namely `Just'
In the first argument of `reader', namely
`(Just . wordsBy (== ','))'
Failed to install fay-0.10.1.0
cabal: Error: some packages failed to install:
fay-0.10.1.0 failed during the building phase. The exception was:
ExitFailure 1

我不知道这是我的错误还是包的问题。

我正在使用:arch linux、ghc-7.4.2、cabal-1.16.0.3

最佳答案

这绝对是一个包问题,因为依赖关系没有指定得足够紧密。如果包裹遵循 Package Versioning Policy ,如果您可以满足依赖关系,则应该构建包。

查看 fay 包描述,我注意到几乎没有任何依赖项有下限或上限。所以基本上,您必须进行试验。

查看代码,我发现 reader错误中提到的是Options.Applicative.Builder.reader .此函数更改了 0.4.3 和 0.5.0 之间的类型签名,因此尝试降级 optparse-applicative通过 --constraint "optparse-applicative < 0.5"cabal install .

关于Haskell fay 安装失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14010302/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com