# Generalized Algebraic Data Type

- Generalized Algebraic Data Type
**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.

**External links**

* [*http://www.haskell.org/haskellwiki/Generalised_algebraic_datatype Page*] on the Haskell wiki

* [*http://haskell.org/ghc/docs/latest/html/users_guide/data-type-extensions.html#gadt Generalised Algebraic Data Types*] in the GHC Users' Guide

* [*http://research.microsoft.com/~simonpj/papers/gadt/gadt-icfp.pdf "Simple unification-based type inference for GADTs"*] -(PDF; by Simon Peyton Jones, Dimitrios Vytiniotis, Stephanie Weirich, and Geoffrey Washburn.

* [*http://techreports.library.cornell.edu:8081/Dienst/UI/1.0/Display/cul.cis/TR2003-1901 "First-Class Phantom Types"*] -(by James Cheney and Ralf Hinze)

* [*http://lambda-the-ultimate.org/node/1134 Generalized Algebraic Data Types and Object-Oriented Programming*]

* [*http://hackage.haskell.org/trac/haskell-prime/wiki/GADTs GADTs - Haskell Prime - Trac*]

* [*http://babel.ls.fi.upm.es/~pablo/Papers/Notes/GADTs.html "Generalised Algebraic Data Types, Phantom Types and Dependent Types"*]

*Wikimedia Foundation.
2010.*

### Look at other dictionaries:

**Algebraic data type** — In computer programming, particularly functional programming and type theory, an algebraic data type (sometimes also called a variant type[1]) is a datatype each of whose values is data from other datatypes wrapped in one of the constructors of… … Wikipedia

**Data type** — For other uses, see Data type (disambiguation). In computer programming, a data type is a classification identifying one of various types of data, such as floating point, integer, or Boolean, that determines the possible values for that type; the … Wikipedia

**Array data type** — Not to be confused with Array data structure. In computer science, an array type is a data type that is meant to describe a collection of elements (values or variables), each selected by one or more indices that can be computed at run time by the … Wikipedia

**Complex data type** — Some programming languages provide a complex data type for complex number storage and arithmetic as a built in (primitive) data type. In some programming environments the term complex data type (in contrast to primitive data types) is a synonym… … Wikipedia

**Composite data type** — In computer science, a composite data type is any data type which can be constructed in a program using its programming language s primitive data types and other composite types. The act of constructing a composite type is known as composition.… … Wikipedia

**Opaque data type** — In computer science, an opaque data type is a user defined data type used like built in data type. It is incompletely defined in an interface, so that ordinary client programs can only manipulate data of that type by calling procedures that have… … Wikipedia

**Decimal data type** — Some programming languages provide a built in (primitive) or library decimal data type to represent non repeating decimal fractions like 0.3 and 1.17 without rounding, and to do arithmetic on them. Examples are the decimal.Decimal type of Python … Wikipedia

**Data structure** — In computer science, a data structure is a particular way of storing and organizing data in a computer so that it can be used efficiently.[1][2] Different kinds of data structures are suited to different kinds of applications, and some are highly … Wikipedia

**Container (data structure)** — For the abstract notion of containers in Type theory, see Container (Type theory). In computer science, a container is a class, a data structure[1][2], or an abstract data type (ADT) whose instances are collections of other objects. In other… … Wikipedia

**Option type** — For families of option contracts in finance, see Option style. In programming languages (especially functional programming languages) and type theory, an option type or maybe type is a polymorphic type that represents encapsulation of an optional … Wikipedia