> Hmm. if haskell types make up a small category that means 'a' and 'f a' are sets. I can't imagine a case where two sets cannot have a mapping between them. Can you give a specific example?
This is incorrect in a bunch of ways. First, Haskell types aren't truly just sets. As a simple, practical example you might have
module Container (makeInt, Container, getValue) where
data Container a
= Container { getValue :: a }
deriving Functor
makeInt :: Int -> Container
makeInt = Container
And now we've got (externally) a type which is equivalent to the identity functor in structure, but has a weird interface which disallows tmap.
More powerfully, we're only actually interested in discussing an interface in and of itself. A type may instantiate many interfaces of varying levels of power, but each interface needs to be well-defined and well-behaved on its own. Then their compositions need to be "glued together" properly.
So even if all Haskell Functors were actually TMapFunctors, it's still important to note that the interface TMapFunctor is a sub interface to Functor which allows more operations and has more laws.
An even stronger example of this is the fact that due to the way Haskell arrows work, all Haskell Functors are actually "strong" functors in the sense that we cannot even truly specify a non-string functor.
Strength is a way that fmap and products (or, really, category tensors) interact.
strength :: Functor f => (a, f b) -> f (a, b)
strength (a, fb) = fmap (\b -> (a, b)) fb
This seems completely obviously possible, but it's only because we can crack open products in building general anonymous arrows. That's not supported in every category and a generic functor should not be expected to satisfy it.
>An even stronger example of this is the fact that due to the way Haskell arrows work, all Haskell Functors are actually "strong" functors in the sense that we cannot even truly specify a non-string functor.
Can you explain this? What is a strong functor and how does it have to do with arrows? Also what do you mean by non-string functor?
A strong functor is one which supports the strength operation above. Haskell -> arrows being based on any lambda term are rich enough to make all Haskell functors strong. But not all functors are!
This is incorrect in a bunch of ways. First, Haskell types aren't truly just sets. As a simple, practical example you might have
And now we've got (externally) a type which is equivalent to the identity functor in structure, but has a weird interface which disallows tmap.More powerfully, we're only actually interested in discussing an interface in and of itself. A type may instantiate many interfaces of varying levels of power, but each interface needs to be well-defined and well-behaved on its own. Then their compositions need to be "glued together" properly.
So even if all Haskell Functors were actually TMapFunctors, it's still important to note that the interface TMapFunctor is a sub interface to Functor which allows more operations and has more laws.
An even stronger example of this is the fact that due to the way Haskell arrows work, all Haskell Functors are actually "strong" functors in the sense that we cannot even truly specify a non-string functor.
Strength is a way that fmap and products (or, really, category tensors) interact.
This seems completely obviously possible, but it's only because we can crack open products in building general anonymous arrows. That's not supported in every category and a generic functor should not be expected to satisfy it.