无法安装Haskell包stream-fusion-0.1.2.5:模糊不清

时间:2015-11-06 08:49:08

标签: haskell cabal cabal-install stream-fusion

我正在尝试构建需要包Barbarosa的项目stream-fusion-0.1.2.5。但是,cabal install失败并显示以下内容

[3 of 3] Compiling Control.Monad.Stream ( Control/Monad/Stream.hs, dist/dist-sandbox-8bb5b9c9/build/Control/Monad/Stream.o )

Control/Monad/Stream.hs:136:10:
    Ambiguous occurrence ‘MonadPlus’
    It could refer to either ‘Control.Monad.Stream.MonadPlus’,
                            defined at Control/Monad/Stream.hs:124:1
                          or ‘GHC.Base.MonadPlus’,
                            imported from ‘GHC.Base’ at Control/Monad/Stream.hs:80:1-15

Control/Monad/Stream.hs:140:10:
    Ambiguous occurrence ‘MonadPlus’
    It could refer to either ‘Control.Monad.Stream.MonadPlus’,
                            defined at Control/Monad/Stream.hs:124:1
                          or ‘GHC.Base.MonadPlus’,
                          imported from ‘GHC.Base’ at Control/Monad/Stream.hs:80:1-15

我在OS X 10.11上使用GHC版本7.10.2,通过Haskell平台安装。

似乎stream-fusion的唯一依赖是base,其版本应该没问题,所以我不确定这里的错误。

1 个答案:

答案 0 :(得分:1)

我能够通过替换

的三次出现来编译
import Data.List.Stream

使用:

import Data.List

并从cabal文件的stream-fusion部分删除build-depends: