1

I'm trying to build the project Barbarosa which requires the package stream-fusion-0.1.2.5. However cabal install fails with the following

[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

I'm using GHC version 7.10.2 on OS X 10.11, installed via Haskell Platform.

It seems that the only dependency of stream-fusion is base whose version should be fine, so I'm not sure what's wrong here.

xji
  • 7,341
  • 4
  • 40
  • 61
  • That package's `Control.Monad.Stream` module defines its own `MonadPlus` typeclass. I think the package has simply bitrotten. – Cactus Nov 06 '15 at 12:07
  • I suspect `GHC.Base` didn't use to export `MonadPlus`, but things were shuffled around by the 7.10 changes. – Ørjan Johansen Nov 06 '15 at 17:02

1 Answers1

1

I was able to get things to compile by replacing the three occurrences of

import Data.List.Stream

with:

import Data.List

and removing stream-fusion from the build-depends: section of the cabal file.

ErikR
  • 51,541
  • 9
  • 73
  • 124