2015-05-30 5 views
3

На ubuntu 12.04, ghc 7.10.3, cabal 1.22.3, 4 гигабайта ОЗУ, я получаю сообщение об ошибке при установке leksah, следуя инструкциям these.Установка leksah не выполняется из-за regex-tdfa-text-1.0.0.2

Любая идея, как решить эту проблему? Чем это вызвано?

[email protected]:~$ 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 

[email protected]:~$ cabal --version 
cabal-install version 1.22.4.0 
using version 1.22.3.0 of the Cabal library 

[email protected]:~$ ghc --version 
The Glorious Glasgow Haskell Compilation System, version 7.10.1 

ответ

4

Пробег:

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

Затем повторите попытку.

+0

большое спасибо! Друг исправил вчера regex-tdfa-text-1.0.0.2 для ghc 7.10.3 (большое спасибо за это!), поэтому я получил leksah и работал с этим патчем, он, вероятно, отправит патч в поддержку пакета – jhegedus