On Tue, Mar 2, 2010 at 4:37 PM, Yitzchak Gale <[email protected]> wrote:
> For this reason, I consider it a bug in GHC that return :: IO a
> is lazy.

Wait a minute...

   return undefined >>= const (return 42)
= const (return 42) undefined
= return 42

But if return undefined = undefined, then that equals;

  undefined >>= const (return 42)

Which, if IO is allowed to have effects (i.e. if putStrLn "Hello,
World" >>= const (return 42)  is to be different than return 42), must
be undefined.

Or does the former not hold in your version of the laws with strict composition?

Luke
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to