[Haskell-cafe] datatype contexts

Dominique Devriese dominique.devriese at cs.kuleuven.be
Mon Jul 26 15:11:41 EDT 2010


2010/7/26 Ryan Ingram <ryani.spam at gmail.com>:
> There are two types of datatype contexts; haskell'98 contexts (which I
> think are terrible), and GHC existential contexts (which I like):

See also "GADT-style" data type declarations [1] and full GADT's [2],
which both behave like GHC existential contexts mentioned above: pattern
matching on them makes available the context constraint.

Dominique

Footnotes:
[1]  http://www.haskell.org/ghc/docs/6.12.2/html/users_guide/data-type-extensions.html#gadt-style
[2]  http://www.haskell.org/ghc/docs/6.12.2/html/users_guide/data-type-extensions.html#gadt


More information about the Haskell-Cafe mailing list