[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:       Jules Bean <jules () jellybean ! co ! uk>
Date:       2005-01-25 14:29:12
Message-ID: 7B7DA942-6EDD-11D9-8550-000A95F0ED78 () jellybean ! co ! uk
[Download RAW message or body]


On 25 Jan 2005, at 13:20, Keean Schupke wrote:

>       f = getChar >>= (\a -> if a == "F" then mzero else return a)
>
>    In this case if the LHS returns "F" the LHS should not have been 
> run... this contradicts itself, so
>    this is a non option I guess.

Good paradox. That is what is upsetting me, too.

> Acutally looking at GHC CVS libraries, there is not a definition for 
> MonadPlus on the state or IO
> monads...
>

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

Jules


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

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