On Tue, May 14, 2002 at 12:14:02PM +0100, Simon Marlow wrote:
> The question we were considering was whether the following should hold
> in the IO monad:
> 
>       (return () >>= \_ -> undefined) `seq` 42   ==  undefined
> 
> [as implied by the left-identity monad law]
>
> This discrepancy applies to any state monad.

It also fails for the reader, writer and continuation monads, also thanks
to lifted functions and tuples.  The right-identity law also fails for
these monads:

        (undefined >>= return) `seq` 42   /=   undefined `seq` 42
_______________________________________________
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell

Reply via email to