gpt4 book ai didi

haskell - 由于 regex-tdfa-text-1.0.0.2,leksah 安装失败

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

在 ubuntu 12.04、ghc 7.10.3、cabal 1.22.3、4 GB RAM 上,我在安装 leksah 时遇到错误,如下 these说明。

知道如何解决这个问题吗?是什么原因造成的?

joco@vm001:~$ cabal install leksah
Resolving dependencies...
Configuring regex-tdfa-text-1.0.0.2...
Building regex-tdfa-text-1.0.0.2...
Failed to install regex-tdfa-text-1.0.0.2
Build log ( /home/joco/.cabal/logs/regex-tdfa-text-1.0.0.2.log ):
Configuring regex-tdfa-text-1.0.0.2...
Building regex-tdfa-text-1.0.0.2...
Preprocessing library regex-tdfa-text-1.0.0.2...
[1 of 2] Compiling Text.Regex.TDFA.Text.Lazy ( Text/Regex/TDFA/Text/Lazy.hs, dist/build/Text/Regex/TDFA/Text/Lazy.o )

Text/Regex/TDFA/Text/Lazy.hs:77:9:
Non type-variable argument
in the constraint: Data.Array.Base.IArray a (Int, Int)
(Use FlexibleContexts to permit this)
When checking that ‘go’ has the inferred type
go :: forall t (a :: * -> * -> *) i.
(Functor (a i), Num i, GHC.Arr.Ix i,
Data.Array.Base.IArray a (Int, Int), Extract t) =>
Int -> t -> [a i (Int, Int)] -> [a i (t, (Int, Int))]
In the expression:
let
go i _ _ | i `seq` False = undefined
go _i _t [] = []
go i t (x : xs)
= let ... in fmap trans x : seq t' (go (off0 + len0) t' xs)
in go 0 source (matchAll regex source)
In an equation for ‘matchAllText’:
matchAllText regex source
= let
go i _ _ | i `seq` False = undefined
go _i _t [] = ...
go i t (x : xs) = ...
in go 0 source (matchAll regex source)
cabal: Error: some packages failed to install:
leksah-0.15.0.1 depends on regex-tdfa-text-1.0.0.2 which failed to install.
regex-tdfa-text-1.0.0.2 failed during the building phase. The exception was:
ExitFailure 1

joco@vm001:~$ cabal --version
cabal-install version 1.22.4.0
using version 1.22.3.0 of the Cabal library

joco@vm001:~$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.10.1

最佳答案

运行:

cabal install regex-tdfa-text --ghc-options=-XFlexibleContexts

然后再试一次。

关于haskell - 由于 regex-tdfa-text-1.0.0.2,leksah 安装失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30550519/

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