Leksah install fails because of regex-tdfa-text-1.0.0.2

On ubuntu 12.04, ghc 7.10.3, cabal 1.22.3, 4 gig RAM, I get an error while installing leksah following these .

Any ideas how to solve this? What is causing this?

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

      

+3


source to share


1 answer


Run:

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

      



Then try again.

+4


source







All Articles