Language extensions

From HaskellWiki
Revision as of 19:20, 4 April 2019 by Ysangkok (talk | contribs) (fix two doc links)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Language extensions are used to enable language features in Haskell that may seem useful in certain cases. They can be used to loosen restrictions in the type system or add completely new language constructs to Haskell.

They can be enabled using the LANGUAGE pragma

{-# LANGUAGE <Extension>, <Extension> #-}

or (in GHC) using flags -X<Extension>.

Before just using the language extension that fits your need, think about when it is useful and what risk it may bring to your program.

List of language extensions by name

This list is far from complete and needs extension.

See also