[Haskell-cafe] Relations between Functor typeclass and kind

Gautier DI FOLCO gautier.difolco at gmail.com
Thu Jun 19 07:51:00 UTC 2014


2014-06-19 9:45 GMT+02:00 Niklas Haas <haskell at nand.wakku.to>:

> 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 :: * -> *.
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>

ok, it's clear, thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140619/675393cf/attachment.html>


More information about the Haskell-Cafe mailing list