Lukas' Notes

type-theory

Definition

Type Class

A type class is a constraint on types that specifies a collection of operations those types must support.

Formally, a type class determines a predicate on types:

A constrained type scheme such as

may be instantiated only with types satisfying .