[Haskell-cafe] Relations between Functor typeclass and kind

Niklas Haas haskell at nand.wakku.to
Thu Jun 19 07:45:48 UTC 2014

On Thu, 19 Jun 2014 09:36:56 +0200, Gautier DI FOLCO <gautier.difolco at gmail.com> wrote:
> Hi all,
> Some days ago, I was talking with someone about Kinds and GADTs.
> At some point he mention that types with this Kind: (* -> *) are called
> Functors.
> So, is there any relations between Functor typeclass and Functor kind?
> Is it considered as a "pattern"? if so, are there some other ones? If you
> have any link on this, I'll take them.
> Thanks in advance for your help.

An argument could be made for all things of kind * -> * being (at least)
functors (in the CT sense) from Hask to a discrete subcategory that
contains only id :: F a -> F a but this is likely not what he meant.

In general, things that are of kind * -> * are not necessarily Haskell
Functors, for a simple counterexample see:

newtype Auto a = Auto (a -> a)

This type does not permit fmap, which would be equivalent to (a -> b) ->
(a -> a) -> b -> b.

The only general relationship between Functor and * -> * is that
Functor's parameter must have that kind, for example in the instance
Functor Maybe we have Maybe :: * -> *.

More information about the Haskell-Cafe mailing list