context-parametric polykinded types
Generic Haskell is a language extension of Haskell for polytypic programming. Constrained types are parametric algebraic types with at least one argument constrained by type-class membership. We explain Generic Haskell, discuss the relevance of constrained types, and show that they are not supported by Generic Haskell. We propose context-parametric polykinded types as a solution, thereby making polytypic functions generic on a larger class of types. Our proposal entails an extension to the Generic Haskell compiler, not the language, and is therefore transparent to the generic programmer.
polykinded types generic haskell polytypic programming constrained types kind-indexed types