Haskell LanguageRole


Introduction

The TypeFamilies language extension allows the programmer to define type-level functions. What distinguishes type functions from non-GADT type constructors is that parameters of type functions can be non-parametric whereas parameters of type constructors are always parametric. This distinction is important to the correctness of the GeneralizedNewTypeDeriving extension. To explicate this distinction, roles are introduced in Haskell.

Remarks