[Haskell-cafe] Re: what is inverse of mzero and return?

Keean Schupke k.schupke at imperial.ac.uk
Tue Jan 25 09:46:17 EST 2005


Jules Bean wrote:

> It's in Control.Monad.Error. Not documented though.
>
> Jules

Ahh, so it is:

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

So, the author of this obviously subscribed to the view that 
side-effects are not
counted when considering function identity...

    Keean


More information about the Haskell-Cafe mailing list