2013-02-09 152 views
1

我試圖安裝最新版本的海斯特,但是errors-1.3.1這是一個依賴項無法安裝。有關如何克服這個問題的任何建議?cabal安裝錯誤-1.3.1失敗

$ cabal install errors-1.3.1 
Resolving dependencies... 
Configuring errors-1.3.1... 
Building errors-1.3.1... 
Preprocessing library errors-1.3.1... 
[1 of 5] Compiling Data.EitherR  (Data/EitherR.hs, dist/build/Data/EitherR.o) 
[2 of 5] Compiling Control.Error.Util (Control/Error/Util.hs, dist/build/Control/Error/Util.o) 

Control/Error/Util.hs:74:10: 
    Could not deduce (Monad m) arising from a use of `fmap' 
    from the context (Functor m) 
     bound by the type signature for 
       fmapRT :: Functor m => (a -> b) -> EitherT l m a -> EitherT l m b 
     at Control/Error/Util.hs:74:1-13 
    Possible fix: 
     add (Monad m) to the context of 
     the type signature for 
      fmapRT :: Functor m => (a -> b) -> EitherT l m a -> EitherT l m b 
    In the expression: fmap 
    In an equation for `fmapRT': fmapRT = fmap 
cabal: Error: some packages failed to install: 
errors-1.3.1 failed during the building phase. The exception was: 
ExitFailure 1 
+1

版本1.3.1是舊的,也許你應該'cabal update'並嘗試安裝1.4.1。如果這是一個由cabal選擇的dep,那麼使用--constraint'errors == 1.4.1' – 2013-02-09 23:51:59

+0

爲什麼最新的Heist(0.11.0)依賴於錯誤-1.3。*? – dan 2013-02-10 00:23:57

+1

Heist的git回購實際上糾正了這個問題。感謝您的幫助。 – dan 2013-02-10 00:25:22

回答

2

我在最新的錯誤,這是1.4.1(1.4.0有錯誤,我不導出EitherT和MaybeT型)解決了這個問題。我在這次添加了依賴關係的上限,以防止它在將來發生。

+0

非常感謝! – dan 2013-02-10 00:41:15

+0

不客氣! – 2013-02-10 01:03:59