Personal tools

Language extensions

From HaskellWiki

(Difference between revisions)
Jump to: navigation, search
(List of language extensions by name)
Line 21: Line 21:
 
* [[KindSignatures]]
 
* [[KindSignatures]]
 
* [[Multi-parameter type class|MultiParamTypeClasses]] : Enable multiple type parameters in type classes.
 
* [[Multi-parameter type class|MultiParamTypeClasses]] : Enable multiple type parameters in type classes.
  +
* [[Monomorphism restriction|NoMonomorphismRestriction]]
 
* [[Overlapping instance|OverlappingInstances]]
 
* [[Overlapping instance|OverlappingInstances]]
 
* [[Rank-N types|Rank2Types]]
 
* [[Rank-N types|Rank2Types]]

Revision as of 21:00, 15 October 2012

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 or (in GHC) using the flag -X. The LANGUAGE pragma should be preferred here.

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.