Generalized Algebraic Data Type
From Wikipedia, the free encyclopedia
- "GADT" redirects here; the acronym can also refer to Ground Air Defense Threat.
Generalized Algebraic Data Types are generalization of the algebraic data types of Haskell and ML which allow data constructors to return types of values other than the original type of the value they were given, which algebraic data types in Haskell 98 must do; they are currently implemented in the GHC compiler as a non-standard extension, used by, among others, darcs.
[edit] External links
Wikibooks has a book on the topic of
- Page on the Haskell wiki
- Explanation in the GHC Users' Guide
- "Simple unification-based type inference for GADTs" -(PDF; by Simon Peyton Jones, Dimitrios Vytiniotis, Stephanie Weirich, and Geoffrey Washburn.
- "First-Class Phantom Types" -(by James Cheney and Ralf Hinze)
- [1]
- [2]
- " Generalised Algebraic Data Types, Phantom Types and Dependent Types"