
22 Jan
2011
22 Jan
'11
1:25 p.m.
On Sat, Jan 22, 2011 at 05:12:00PM +0100, Bas van Dijk wrote:
On 22 January 2011 05:16, Edward Kmett
wrote: I went with the default being to avoid prematurely forcing a bottom when possible, to avoid being called out by the strictness police, but I'm not terribly wedded to the behavior.
Just for reference, the Functor instance on pairs is strict in the pair:
instance Functor ((,) a) where fmap f (x,y) = (x, f y)
And this is necessary for the functor laws, because with fmap' f ~(x,y) = (x, f y) we obtain: fmap' id undefined = (undefined, undefined) /= undefined = id undefined Wolfram