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

Jules Bean jules at jellybean.co.uk
Mon Jan 24 05:16:38 EST 2005


On 24 Jan 2005, at 09:36, Keean Schupke wrote:

> Ashley Yakeley wrote:
>
>>
>> I disagree. Clearly (putStrLn "Hello" >> mzero) is not the same as 
>> mzero.
>>
>>
> Yes it is, side effects are quite clearly not counted. The value
> of (putStrLn "Hello" >> mzero") is mzero.
>

This makes no sense to me at all.

putStrLn "Hello" has type IO (). mzero (could) have type IO ().

But they certainly do not denote the same element of IO ()!

Monad/MonadPlus laws surely apply to the full monadic type m a, not 
just the value type a?

Jules



More information about the Haskell-Cafe mailing list