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

Ashley Yakeley ashley at semantic.org
Sun Jan 23 17:51:40 EST 2005


In article <200501231934.01764.daniel.is.fischer at web.de>,
 Daniel Fischer <daniel.is.fischer at web.de> wrote:

> from an earlier message of Keean:
> >  1. |mzero >>= f == mzero|
> >  2. |m >>= (\x -> mzero) == mzero|
> >  3. |mzero `mplus` m == m|
> >  4. |m `mplus` mzero == m|
> 
> What exactly does 2. mean in the IO-case?
> a) the results of both calculations are equal
> -- then it also holds for IO.
> b) both produce the same output and the same result
> -- then it doesn't hold for IO.
> I think, a) is the correct interpretation.

I disagree. Clearly (putStrLn "Hello" >> mzero) is not the same as mzero.

-- 
Ashley Yakeley, Seattle WA



More information about the Haskell-Cafe mailing list