[prev in list] [next in list] [prev in thread] [next in thread] 

List:       haskell-cafe
Subject:    Re: [Haskell-cafe] Re: what is inverse of mzero and return?
From:       Keean Schupke <k.schupke () imperial ! ac ! uk>
Date:       2005-01-25 14:46:17
Message-ID: 41F65BB9.8060708 () imperial ! ac ! uk
[Download RAW message or body]

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic