instance MPlus IO?

Tom Pledger Tom.Pledger@peace.com
Mon, 19 May 2003 08:23:26 +1200


Hal Daume III writes:
 | The docs claim this instance exists, but it doesn't seem to.
 | Moreoever, such an instance doesn't make sense to me.

The following is from Control.Monad.Error.

instance MonadPlus IO where
	mzero       = ioError (userError "mzero")
	m `mplus` n = m `catch` \_ -> n

HTH.
Tom