[Haskell-cafe] MonadPlus instance for IO

Simon Peyton-Jones simonpj at microsoft.com
Wed Feb 2 08:44:32 EST 2005


that instance seems to be only in Control.Monad.Error in the 'mtl'
package.  It's not in the standard base package.

You may need to import an mtl module to tell GHC to look there.

Simon

| -----Original Message-----
| From: haskell-cafe-bounces at haskell.org
[mailto:haskell-cafe-bounces at haskell.org] On Behalf Of
| David Roundy
| Sent: 02 February 2005 13:18
| To: haskell-cafe at haskell.org
| Subject: [Haskell-cafe] MonadPlus instance for IO
| 
| 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.
| --
| David Roundy
| http://www.darcs.net
| _______________________________________________
| Haskell-Cafe mailing list
| Haskell-Cafe at haskell.org
| http://www.haskell.org/mailman/listinfo/haskell-cafe


More information about the Haskell-Cafe mailing list