Which kinds of lawfull `Functor`s are possible in Haskell?

168 Views Asked by At

I know following types of Functors:

  1. Polynomial functor == simple not-nested parameterized datatype
  2. Generalization of 1, by using "parameter removing" newtypes: Fix, Some (existentials), possibly some GADTs
  3. Exponential functor == X -> a for fixed X
  4. Generalization of 2 to all positive-position functions.
  5. Compositions of previous points

It seems like points 2,4,5 can be covered by some conditional instances, like for Data.Functor.Compose.

Question:

  1. Is my statement correct or I am missing something?
  2. Can this be formalized? In particular: what is full list on point 1 and how to fix that points 2,4,5 actually do interfere?
  3. Can this be described using HFunctors?
0

There are 0 best solutions below