[Haskell-cafe] MonadPlus instance for IO
Daniel Fischer
daniel.is.fischer at web.de
Wed Feb 2 08:41:42 EST 2005
Am Mittwoch, 2. Februar 2005 14:17 schrieb David Roundy:
> I'm sure I'm doing something stupid, but somehow ghc isn't recognizing the
> existance of a MonadPlus instance for IO:
>
> DarcsIO.lhs:48:
> No instance for (MonadPlus IO)
> arising from use of `mplus' at DarcsIO.lhs:48
> In the definition of `foo':
> foo = (fail "aaack") `mplus` (fail "foobar")
>
> Any idea what I'm doing wrong? I'm using
>
> $ ghc --version
> The Glorious Glasgow Haskell Compilation System, version 6.2.2
>
> packaged for debian.
Probably you haven't imported 'Control.Monad.Error', where the instance is
defined. I did and all went well.
Cheers,
Daniel
More information about the Haskell-Cafe
mailing list