[Haskell] Re: GADT: call for proper terminology

Niklas Broberg niklas.broberg at gmail.com
Wed Oct 11 03:22:28 EDT 2006

On 10/11/06, oleg at pobox.com <oleg at pobox.com> wrote:
> Niklas Broberg wrote:
> > Annotate the data type using a GADT:
> > data MyData a where
> >  MyCon :: MyData a
> The range of the data constructor MyCon is the entire type MyData a --
> so the above data type is the regular algebraic data type, and can be
> written just as
>         data MyData a = MyCon
> which, some say, makes the fact 'a' is phantom, and the overall intent
> clearer.
> One may hear phrases how generally awesome and indispensable GADT are;
> it is distressing to realize then that sometimes (often?) one is
> talking about regular algebraic data types, only in the `where'
> syntax.
> It helps to reduce confusion about the merits of various features and
> additions to Haskell if we use the term GADT exclusively for truly
> _generalized_ algebraic data types.

Right you are, I stand corrected.


More information about the Haskell mailing list