Is there a reason that `Functor` is not a superclass of `Category`?

86 views Asked by At

It seems you can simply declare:

import qualified Control.Category as Cat
instance Cat.Category q => Functor (q r) where
     fmap = (Cat..)

Is there anything speaking against this?

1

There are 1 answers

0
chi On BEST ANSWER

That instance would overlap with many other useful instances, e.g. one could no longer add

instance Functor (State s) where ...

for the State s monad.