On 14 Apr 2010, at 09:31, Ashley Yakeley wrote: > On Wed, 2010-04-14 at 09:29 +0100, Thomas Davie wrote: >> It isn't? >> >> fPrelude> fmap id (undefined :: IO ()) >> *** Exception: Prelude.undefined > > ghci is helpfully running the IO action for you. Try this: > > seq (fmap id (undefined :: IO ())) "not bottom"
Ah, rubbish... I guess this further reinforces my point though – we have a mixture of places where we consider _|_ when considering laws, and places where we don't consider _|_. This surely needs better defined somewhere. For reference, the fmap on tuples which ignores the bottom case for the sake of the laws is useful :(. Bob_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe