Generalized algebraic data type

From Wikipedia, the free encyclopedia

  (Redirected from GADT)
Jump to: navigation, search

Generalized algebraic data types are generalizations of the algebraic data types of Haskell and ML, applying to parametric types. With this extension, the parameters of the return type of a data constructor can be freely chosen when declaring the constructor, while for algebraic data types in Haskell 98, the type parameter of the return value is inferred from data types of parameters; they are currently implemented in the GHC compiler as a non-standard extension, used by, among others, darcs.

[edit] External links

Languages