[Haskell-cafe] Re: instance Eq (a -> b)

Thomas Davie tom.davie at gmail.com
Wed Apr 14 04:29:23 EDT 2010

On 14 Apr 2010, at 09:25, Ashley Yakeley wrote:

> Thomas Davie wrote:
>> Because we consider that the Functor laws must hold for all values in the type (including bottom).
> This is not so for IO, which is an instance of Functor. "fmap id undefined" is not bottom.

It isn't?

fPrelude> fmap id (undefined :: IO ())
*** Exception: Prelude.undefined


More information about the Haskell-Cafe mailing list