Are Functor instances unique?
I was wondering to what extent Functor instances in Haskell are determined (uniquely) by the functor laws. Since ghc can derive Functor instances for at least "run-of-the-mill" data types, it seems that they must be unique at least in a wide variety of cases. For convenience, the Functor definition and functor laws are: class Functor f where fmap :: (a -> b) -> f a -> f b fmap id = id fmap (g . h) = (fmap g) . (fmap h) Questions: Can one derive the definition of map starting from the assumption that it is a Functor instance for data List a = Nil | Cons a (List a) ? If so, what assumptions have