I have no idea why fmap _ a = a
below is illegal. Here is the code:
data Sum a b = First a | Second b
instance Functor (Sum a) where
fmap f (Second b) = Second (f b)
fmap _ (First a) = First a
fmap _ a = a -- Why can't I do this instead?
Other question is, does this have performance penalty implications or is something that happens only at compile time?