
2 Mar
2010
2 Mar
'10
7:02 p.m.
On Tue, Mar 2, 2010 at 4:37 PM, Yitzchak Gale
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