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

Haskell 由于regex-tdfa-text-1.0.0.2,leksah安装失败,haskell,cabal,cabal-install,leksah,Haskell,Cabal,Cabal Install,Leksah,在Ubuntu12.04、ghc 7.10.3、cabal 1.22.3、4G内存上,我按照说明安装leksah时出错 你知道怎么解决这个问题吗?这是什么原因造成的 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-te

在Ubuntu12.04、ghc 7.10.3、cabal 1.22.3、4G内存上,我按照说明安装leksah时出错

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

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
运行:


然后再试一次。

非常感谢!一位朋友昨天为ghc 7.10.3修补了regex-tdfa-text-1.0.0.2(非常感谢!),因此我让leksah安装并运行了该修补程序,他可能会将修补程序发送给软件包维护人员
cabal install regex-tdfa-text --ghc-options=-XFlexibleContexts