Cabal-1.14.0: A framework for packaging Haskell softwareContentsIndex
Haskell language dialects and extensions
data Language
= Haskell98
| Haskell2010
| UnknownLanguage String
knownLanguages :: [Language]
data Extension
= EnableExtension KnownExtension
| DisableExtension KnownExtension
| UnknownExtension String
data KnownExtension
= OverlappingInstances
| UndecidableInstances
| IncoherentInstances
| DoRec
| RecursiveDo
| ParallelListComp
| MultiParamTypeClasses
| MonomorphismRestriction
| FunctionalDependencies
| Rank2Types
| RankNTypes
| PolymorphicComponents
| ExistentialQuantification
| ScopedTypeVariables
| PatternSignatures
| ImplicitParams
| FlexibleContexts
| FlexibleInstances
| EmptyDataDecls
| KindSignatures
| BangPatterns
| TypeSynonymInstances
| TemplateHaskell
| ForeignFunctionInterface
| Arrows
| Generics
| ImplicitPrelude
| NamedFieldPuns
| PatternGuards
| GeneralizedNewtypeDeriving
| ExtensibleRecords
| RestrictedTypeSynonyms
| HereDocuments
| MagicHash
| TypeFamilies
| StandaloneDeriving
| UnicodeSyntax
| UnliftedFFITypes
| LiberalTypeSynonyms
| TypeOperators
| RecordWildCards
| RecordPuns
| DisambiguateRecordFields
| OverloadedStrings
| GADTSyntax
| MonoPatBinds
| RelaxedPolyRec
| ExtendedDefaultRules
| UnboxedTuples
| DeriveDataTypeable
| ConstrainedClassMethods
| PackageImports
| ImpredicativeTypes
| NewQualifiedOperators
| PostfixOperators
| QuasiQuotes
| TransformListComp
| ViewPatterns
| XmlSyntax
| RegularPatterns
| TupleSections
| GHCForeignImportPrim
| NPlusKPatterns
| DoAndIfThenElse
| RebindableSyntax
| ExplicitForAll
| DatatypeContexts
| MonoLocalBinds
| DeriveFunctor
| DeriveTraversable
| DeriveFoldable
| NondecreasingIndentation
| SafeImports
| Safe
| Trustworthy
| ConstraintKinds
knownExtensions :: [KnownExtension]
deprecatedExtensions :: [(Extension, Maybe Extension)]
data Language

This represents a Haskell language dialect.

Language Extensions are interpreted relative to one of these base languages.

Haskell98The Haskell 98 language as defined by the Haskell 98 report.
Haskell2010The Haskell 2010 language as defined by the Haskell 2010 report.
UnknownLanguage StringAn unknown language, identified by its name.
knownLanguages :: [Language]
data Extension

This represents language extensions beyond a base Language definition (such as Haskell98) that are supported by some implementations, usually in some special mode.

Where applicable, references are given to an implementation's official documentation, e.g. "GHC § 7.2.1" for an extension documented in section 7.2.1 of the GHC User's Guide.

EnableExtension KnownExtensionEnable a known extension
DisableExtension KnownExtensionDisable a known extension
UnknownExtension StringAn unknown extension, identified by the name of its LANGUAGE pragma.
data KnownExtension
Allow overlapping class instances, provided there is a unique most specific instance for each use.
Ignore structural rules guaranteeing the termination of class instance resolution. Termination is guaranteed by a fixed-depth recursion stack, and compilation may fail if this depth is exceeded.
Implies OverlappingInstances. Allow the implementation to choose an instance even when it is possible that further instantiation of types will lead to a more specific instance being applicable.
GHC § 7.3.8
Allows recursive bindings in do blocks, using the rec keyword.
Deprecated in GHC. Allows recursive bindings using mdo, a variant of do. DoRec provides a different, preferred syntax.
GHC § 7.3.9
Provide syntax for writing list comprehensions which iterate over several lists together, like the zipWith family of functions.
Allow multiple parameters in a type class.
GHC § 7.17
Enable the dreaded monomorphism restriction.
GHC § 7.6.2
Allow a specification attached to a multi-parameter type class which indicates that some parameters are entirely determined by others. The implementation will check that this property holds for the declared instances, and will use this property to reduce ambiguity in instance resolution.
GHC § 7.8.5
Like RankNTypes but does not allow a higher-rank type to itself appear on the left of a function arrow.
GHC § 7.8.5
Allow a universally-quantified type to occur on the left of a function arrow.
GHC § 7.8.5
Allow data constructors to have polymorphic arguments. Unlike RankNTypes, does not allow this for ordinary functions.
GHC § 7.4.4
Allow existentially-quantified data constructors.
GHC § 7.8.7
Cause a type variable in a signature, which has an explicit forall quantifier, to scope over the definition of the accompanying value declaration.
PatternSignaturesDeprecated, use ScopedTypeVariables instead.
GHC § 7.8.3
Enable implicit function parameters with dynamic scope.
GHC § 7.8.2
Relax some restrictions on the form of the context of a type signature.
Relax some restrictions on the form of the context of an instance declaration.
GHC § 7.4.1
Allow data type declarations with no constructors.
GHC § 4.10.3
Run the C preprocessor on Haskell source code.
GHC § 7.8.4
Allow an explicit kind signature giving the kind of types over which a type variable ranges.
GHC § 7.11
Enable a form of pattern which forces evaluation before an attempted match, and a form of strict let/where binding.
Allow type synonyms in instance heads.
GHC § 7.9
Enable Template Haskell, a system for compile-time metaprogramming.
GHC § 8
Enable the Foreign Function Interface. In GHC, implements the standard Haskell 98 Foreign Function Interface Addendum, plus some GHC-specific extensions.
GHC § 7.10
Enable arrow notation.
GHC § 7.16
Enable generic type classes, with default instances defined in terms of the algebraic structure of a type.
GHC § 7.3.11
Enable the implicit importing of the module Prelude. When disabled, when desugaring certain built-in syntax into ordinary identifiers, use whatever is in scope rather than the Prelude -- version.
GHC § 7.3.15
Enable syntax for implicitly binding local names corresponding to the field names of a record. Puns bind specific names, unlike RecordWildCards.
GHC § 7.3.5
Enable a form of guard which matches a pattern and binds variables.
GHC § 7.5.4
Allow a type declared with newtype to use deriving for any class with an instance for the underlying type.
Hugs § 7.1
Enable the "Trex" extensible records system.
Hugs § 7.2
Enable type synonyms which are transparent in some definitions and opaque elsewhere, as a way of implementing abstract datatypes.
Hugs § 7.3
Enable an alternate syntax for string literals, with string templating.
GHC § 7.3.2
Allow the character # as a postfix modifier on identifiers. Also enables literal syntax for unboxed values.
GHC § 7.7
Allow data types and type synonyms which are indexed by types, i.e. ad-hoc polymorphism for types.
GHC § 7.5.2
Allow a standalone declaration which invokes the type class deriving mechanism.
GHC § 7.3.1
Allow certain Unicode characters to stand for certain ASCII character sequences, e.g. keywords and punctuation.
GHC § 8.1.1
Allow the use of unboxed types as foreign types, e.g. in foreign import and foreign export.
GHC § 7.4.3
Defer validity checking of types until after expanding type synonyms, relaxing the constraints on how synonyms may be used.
GHC § 7.4.2
Allow the name of a type constructor, type class, or type variable to be an infix operator.
GHC § 7.3.16
Enable syntax for implicitly binding local names corresponding to the field names of a record. A wildcard binds all unmentioned names, unlike NamedFieldPuns.
RecordPunsDeprecated, use NamedFieldPuns instead.
GHC § 7.3.14
Allow a record field name to be disambiguated by the type of the record it's in.
GHC § 7.6.4
Enable overloading of string literals using a type class, much like integer literals.
GHC § 7.4.6
Enable generalized algebraic data types, in which type variables may be instantiated on a per-constructor basis. Implies GADTSyntax.
GADTSyntaxEnable GADT syntax for declaring ordinary algebraic datatypes.
GHC § 7.17.2
Make pattern bindings monomorphic.
GHC § 7.8.8
Relax the requirements on mutually-recursive polymorphic functions.
GHC § 2.4.5
Allow default instantiation of polymorphic types in more situations.
GHC § 7.2.2
Enable unboxed tuples.
GHC § 7.5.3
Enable deriving for classes Data.Typeable.Typeable and Data.Generics.Data.
Allow a class method's type to place additional constraints on a class type variable.
GHC § 7.3.18
Allow imports to be qualified by the package name the module is intended to be imported from, e.g.
 import "network" Network.Socket
GHC § 7.8.6
Deprecated in GHC 6.12 and will be removed in GHC 7. Allow a type variable to be instantiated at a polymorphic type.
GHC § 7.3.3
Change the syntax for qualified infix operators.
GHC § 7.3.12
Relax the interpretation of left operator sections to allow unary postfix operators.
GHC § 7.9.5
Enable quasi-quotation, a mechanism for defining new concrete syntax for expressions and patterns.
GHC § 7.3.10
Enable generalized list comprehensions, supporting operations such as sorting and grouping.
GHC § 7.3.6
Enable view patterns, which match a value by applying a function and matching on the result.
XmlSyntaxAllow concrete XML syntax to be used in expressions and patterns, as per the Haskell Server Pages extension language: The ideas behind it are discussed in the paper "Haskell Server Pages through Dynamic Loading" by Niklas Broberg, from Haskell Workshop '05.
RegularPatternsAllow regular pattern matching over lists, as discussed in the paper "Regular Expression Patterns" by Niklas Broberg, Andreas Farre and Josef Svenningsson, from ICFP '04.
TupleSectionsEnables the use of tuple sections, e.g. (, True) desugars into x -> (x, True).
GHCForeignImportPrimAllows GHC primops, written in C--, to be imported into a Haskell file.
NPlusKPatternsSupport for patterns of the form n + k, where k is an integer literal.
DoAndIfThenElseImprove the layout rule when if expressions are used in a do block.
RebindableSyntaxMakes much of the Haskell sugar be desugared into calls to the function with a particular name that is in scope.
ExplicitForAllMake forall a keyword in types, which can be used to give the generalisation explicitly.
DatatypeContextsAllow contexts to be put on datatypes, e.g. the Eq a in data Eq a => Set a = NilSet | ConsSet a (Set a).
MonoLocalBindsLocal (let and where) bindings are monomorphic.
DeriveFunctorEnable deriving for the Data.Functor.Functor class.
DeriveTraversableEnable deriving for the Data.Traversable.Traversable class.
DeriveFoldableEnable deriving for the Data.Foldable.Foldable class.
NondecreasingIndentationEnable non-decreasing indentation for 'do' blocks.
GHC § 7.20.3
Allow imports to be qualified with a safe keyword that requires the imported module be trusted as according to the Safe Haskell definition of trust.
 import safe Network.Socket
GHC § 7.20
Compile a module in the Safe, Safe Haskell mode -- a restricted form of the Haskell language to ensure type safety.
GHC § 7.20
Compile a module in the Trustworthy, Safe Haskell mode -- no restrictions apply but the module is marked as trusted as long as the package the module resides in is trusted.
GHC § 7.40
Allow type classimplicit parameterequality constraints to be used as types with the special kind Constraint. Also generalise the (ctxt => ty) syntax so that any type of kind Constraint can occur before the arrow.
knownExtensions :: [KnownExtension]
deprecatedExtensions :: [(Extension, Maybe Extension)]
Extensions that have been deprecated, possibly paired with another extension that replaces it.
Produced by Haddock version 2.6.1