Difference between revisions of "Language extensions"

From HaskellWiki
Jump to: navigation, search
(don't link to gitlab version of docs (it is a development version))
(List of language extensions by name: add QualifiedDo)
Line 44: Line 44:
 
* [[Undecidable instance|UndecidableInstances]]
 
* [[Undecidable instance|UndecidableInstances]]
 
* [http://www.haskell.org/ghc/docs/latest/html/users_guide/syntax-extns.html#view-patterns ViewPatterns]
 
* [http://www.haskell.org/ghc/docs/latest/html/users_guide/syntax-extns.html#view-patterns ViewPatterns]
  +
* [[QualifiedDo]]
   
 
= See also =
 
= See also =

Revision as of 04:31, 23 July 2020

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