Cabal-syntax-3.12.1.0: A library for working with .cabal files

Copyright | Isaac Jones 2003-2004
License | BSD3
Maintainer | libraries@haskell.org
Portability | portable
Safe Haskell | None
Language | Haskell2010

Language.Haskell.Extension

Description

Haskell language dialects and extensions

Synopsis

- data Language
  - = Haskell98
  - | Haskell2010
  - | GHC2021
  - | GHC2024
  - | UnknownLanguage String
- knownLanguages :: [Language]
- classifyLanguage :: String -> Language
- data Extension
  - = EnableExtension KnownExtension
  - | DisableExtension KnownExtension
  - | UnknownExtension String
- data KnownExtension
  - = OverlappingInstances
  - | UndecidableInstances
  - | IncoherentInstances
  - | DoRec
  - | RecursiveDo
  - | ParallelListComp
  - | MultiParamTypeClasses
  - | MonomorphismRestriction
  - | DeepSubsumption
  - | FunctionalDependencies
  - | Rank2Types
  - | RankNTypes
  - | PolymorphicComponents
  - | ExistentialQuantification
  - | ScopedTypeVariables
  - | PatternSignatures
  - | ImplicitParams
  - | FlexibleContexts
  - | FlexibleInstances
  - | EmptyDataDecls
  - | CPP
  - | KindSignatures
  - | BangPatterns
  - | TypeSynonymInstances
  - | TemplateHaskell
  - | ForeignFunctionInterface
  - | Arrows
  - | Generics
  - | ImplicitPrelude
  - | NamedFieldPuns
  - | PatternGuards
  - | GeneralizedNewtypeDeriving
  - | GeneralisedNewtypeDeriving
  - | ExtensibleRecords
  - | RestrictedTypeSynonyms
  - | HereDocuments
  - | MagicHash
  - | TypeFamilies
  - | StandaloneDeriving
  - | UnicodeSyntax
  - | UnliftedFFITypes
  - | InterruptibleFFI
  - | CApiFFI
  - | LiberalTypeSynonyms
  - | TypeOperators
  - | RecordWildCards
  - | RecordPuns
  - | DisambiguateRecordFields
  - | TraditionalRecordSyntax
  - | OverloadedStrings
  - | GADTs
  - | GADTSyntax
  - | MonoPatBinds
  - | RelaxedPolyRec
  - | ExtendedDefaultRules
  - | UnboxedTuples
  - | DeriveDataTypeable
  - | DeriveGeneric
  - | DefaultSignatures
  - | InstanceSigs
  - | ConstrainedClassMethods
  - | PackageImports
  - | ImpredicativeTypes
  - | NewQualifiedOperators
  - | PostfixOperators
  - | QuasiQuotes
  - | TransformListComp
  - | MonadComprehensions
  - | ViewPatterns
  - | XmlSyntax
  - | RegularPatterns
  - | TupleSections
  - | GHCForeignImportPrim
  - | NPlusKPatterns
  - | DoAndIfThenElse
  - | MultiWayIf
  - | LambdaCase
  - | RebindableSyntax
  - | ExplicitForAll
  - | DatatypeContexts
  - | MonoLocalBinds
  - | DeriveFunctor
  - | DeriveTraversable
  - | DeriveFoldable
  - | NondecreasingIndentation
  - | SafeImports
  - | Safe
  - | Trustworthy
  - | Unsafe
  - | ConstraintKinds
  - | PolyKinds
  - | DataKinds
  - | TypeData
  - | ParallelArrays
  - | RoleAnnotations
  - | OverloadedLists
  - | EmptyCase
  - | AutoDeriveTypeable
  - | NegativeLiterals
  - | BinaryLiterals
  - | NumDecimals
  - | NullaryTypeClasses
  - | ExplicitNamespaces
  - | AllowAmbiguousTypes
  - | JavaScriptFFI
  - | PatternSynonyms
  - | PartialTypeSignatures
  - | NamedWildCards
  - | DeriveAnyClass
  - | DeriveLift
  - | StaticPointers
  - | StrictData
  - | Strict
  - | ApplicativeDo
  - | DuplicateRecordFields
  - | TypeApplications
  - | TypeInType
  - | UndecidableSuperClasses
  - | MonadFailDesugaring
  - | TemplateHaskellQuotes
  - | OverloadedLabels
  - | TypeFamilyDependencies
  - | DerivingStrategies
  - | DerivingVia
  - | UnboxedSums
  - | HexFloatLiterals
  - | BlockArguments
  - | NumericUnderscores
  - | QuantifiedConstraints
  - | StarIsType
  - | EmptyDataDeriving
  - | CUSKs
  - | ImportQualifiedPost
  - | StandaloneKindSignatures
  - | UnliftedNewtypes
  - | LexicalNegation
  - | QualifiedDo
  - | LinearTypes
  - | RequiredTypeArguments
  - | FieldSelectors
  - | OverloadedRecordDot
  - | OverloadedRecordUpdate
  - | UnliftedDatatypes
  - | ExtendedLiterals
  - | AlternativeLayoutRule
  - | AlternativeLayoutRuleTransitional
  - | RelaxedLayout
  - | TypeAbstractions
  - | ListTuplePuns
- deprecatedExtensions :: [(Extension, Maybe Extension)]
- classifyExtension :: String -> Extension
- knownExtensions :: [KnownExtension]

# Documentation

data Language Source #

This represents a Haskell language dialect.

Language `Extension`s are interpreted relative to one of these base languages.

Constructors

Haskell98 | The Haskell 98 language as defined by the Haskell 98 report. http://haskell.org/onlinereport/
Haskell2010 | The Haskell 2010 language as defined by the Haskell 2010 report. http://www.haskell.org/onlinereport/haskell2010
GHC2021 | The GHC2021 collection of language extensions. https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0380-ghc2021.rst
GHC2024 | The GHC2024 collection of language extensions. https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0613-ghc2024.rst
UnknownLanguage String | An unknown language, identified by its name.

#### Instances

Instances details

Parsec Language Source # |
Instance details Defined in Language.Haskell.Extension Methods parsec :: CabalParsing m => m Language Source #
Pretty Language Source # |
Instance details Defined in Language.Haskell.Extension Methods pretty :: Language -> Doc Source # prettyVersioned :: CabalSpecVersion -> Language -> Doc Source #
Structured Language Source # |
Instance details Defined in Language.Haskell.Extension Methods structure :: Proxy Language -> Structure Source # structureHash' :: Tagged Language MD5
Binary Language Source # |
Instance details Defined in Language.Haskell.Extension Methods put :: Language -> Put Source # get :: Get Language Source # putList :: [Language] -> Put Source #
NFData Language Source # |
Instance details Defined in Language.Haskell.Extension Methods rnf :: Language -> () Source #
Data Language Source # |

Instance details

Defined in Language.Haskell.Extension

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Language -> c Language #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Language #

toConstr :: Language -> Constr #

dataTypeOf :: Language -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Language) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Language) #

gmapT :: (forall b. Data b => b -> b) -> Language -> Language #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Language -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Language -> r #

gmapQ :: (forall d. Data d => d -> u) -> Language -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Language -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Language -> m Language #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Language -> m Language #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Language -> m Language #

Generic Language Source # |

Instance details

Defined in Language.Haskell.Extension

Associated Types

type Rep Language |

Instance details

Defined in Language.Haskell.Extension

type Rep Language = D1 ('MetaData "Language" "Language.Haskell.Extension" "Cabal-syntax-3.12.1.0-5c0e" 'False) ((C1 ('MetaCons "Haskell98" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Haskell2010" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "GHC2021" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "GHC2024" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "UnknownLanguage" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)))))

Methods

from :: Language -> Rep Language x #

to :: Rep Language x -> Language #

Read Language Source # |
Instance details Defined in Language.Haskell.Extension Methods readsPrec :: Int -> ReadS Language # readList :: ReadS [Language] # readPrec :: ReadPrec Language # readListPrec :: ReadPrec [Language] #
Show Language Source # |
Instance details Defined in Language.Haskell.Extension Methods showsPrec :: Int -> Language -> ShowS # show :: Language -> String # showList :: [Language] -> ShowS #
Eq Language Source # |
Instance details Defined in Language.Haskell.Extension Methods (==) :: Language -> Language -> Bool # (/=) :: Language -> Language -> Bool #
Ord Language Source # |
Instance details Defined in Language.Haskell.Extension Methods compare :: Language -> Language -> Ordering # (<) :: Language -> Language -> Bool # (<=) :: Language -> Language -> Bool # (>) :: Language -> Language -> Bool # (>=) :: Language -> Language -> Bool # max :: Language -> Language -> Language # min :: Language -> Language -> Language #
type Rep Language Source # |

Instance details

Defined in Language.Haskell.Extension

type Rep Language = D1 ('MetaData "Language" "Language.Haskell.Extension" "Cabal-syntax-3.12.1.0-5c0e" 'False) ((C1 ('MetaCons "Haskell98" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Haskell2010" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "GHC2021" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "GHC2024" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "UnknownLanguage" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)))))

knownLanguages :: [Language] Source #

List of known (supported) languages for GHC, oldest first.

classifyLanguage :: String -> Language Source #

data Extension Source #

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.

Constructors

EnableExtension KnownExtension | Enable a known extension
DisableExtension KnownExtension | Disable a known extension
UnknownExtension String | An unknown extension, identified by the name of its `LANGUAGE` pragma.

#### Instances

Instances details

Parsec Extension Source # |
Instance details Defined in Language.Haskell.Extension Methods parsec :: CabalParsing m => m Extension Source #
Pretty Extension Source # |
Instance details Defined in Language.Haskell.Extension Methods pretty :: Extension -> Doc Source # prettyVersioned :: CabalSpecVersion -> Extension -> Doc Source #
Structured Extension Source # |
Instance details Defined in Language.Haskell.Extension Methods structure :: Proxy Extension -> Structure Source # structureHash' :: Tagged Extension MD5
Binary Extension Source # |
Instance details Defined in Language.Haskell.Extension Methods put :: Extension -> Put Source # get :: Get Extension Source # putList :: [Extension] -> Put Source #
NFData Extension Source # |
Instance details Defined in Language.Haskell.Extension Methods rnf :: Extension -> () Source #
Data Extension Source # |

Instance details

Defined in Language.Haskell.Extension

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Extension -> c Extension #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Extension #

toConstr :: Extension -> Constr #

dataTypeOf :: Extension -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Extension) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Extension) #

gmapT :: (forall b. Data b => b -> b) -> Extension -> Extension #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Extension -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Extension -> r #

gmapQ :: (forall d. Data d => d -> u) -> Extension -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Extension -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Extension -> m Extension #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Extension -> m Extension #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Extension -> m Extension #

Generic Extension Source # |

Instance details

Defined in Language.Haskell.Extension

Associated Types

type Rep Extension |

Instance details

Defined in Language.Haskell.Extension

type Rep Extension = D1 ('MetaData "Extension" "Language.Haskell.Extension" "Cabal-syntax-3.12.1.0-5c0e" 'False) (C1 ('MetaCons "EnableExtension" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 KnownExtension)) :+: (C1 ('MetaCons "DisableExtension" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 KnownExtension)) :+: C1 ('MetaCons "UnknownExtension" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String))))

Methods

from :: Extension -> Rep Extension x #

to :: Rep Extension x -> Extension #

Read Extension Source # |
Instance details Defined in Language.Haskell.Extension Methods readsPrec :: Int -> ReadS Extension # readList :: ReadS [Extension] # readPrec :: ReadPrec Extension # readListPrec :: ReadPrec [Extension] #
Show Extension Source # |
Instance details Defined in Language.Haskell.Extension Methods showsPrec :: Int -> Extension -> ShowS # show :: Extension -> String # showList :: [Extension] -> ShowS #
Eq Extension Source # |
Instance details Defined in Language.Haskell.Extension Methods (==) :: Extension -> Extension -> Bool # (/=) :: Extension -> Extension -> Bool #
Ord Extension Source # |
Instance details Defined in Language.Haskell.Extension Methods compare :: Extension -> Extension -> Ordering # (<) :: Extension -> Extension -> Bool # (<=) :: Extension -> Extension -> Bool # (>) :: Extension -> Extension -> Bool # (>=) :: Extension -> Extension -> Bool # max :: Extension -> Extension -> Extension # min :: Extension -> Extension -> Extension #
type Rep Extension Source # |

Instance details

Defined in Language.Haskell.Extension

type Rep Extension = D1 ('MetaData "Extension" "Language.Haskell.Extension" "Cabal-syntax-3.12.1.0-5c0e" 'False) (C1 ('MetaCons "EnableExtension" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 KnownExtension)) :+: (C1 ('MetaCons "DisableExtension" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 KnownExtension)) :+: C1 ('MetaCons "UnknownExtension" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String))))

data KnownExtension Source #

Known Haskell language extensions, including deprecated and undocumented ones.

Check “Overview of all language extensions” in GHC User’s Guide for more information.

Constructors

OverlappingInstances | Allow overlapping class instances, provided there is a unique most specific instance for each use.
UndecidableInstances | 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.
IncoherentInstances | 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.
DoRec | (deprecated) Deprecated in favour of `RecursiveDo`. Old description: Allow recursive bindings in `do` blocks, using the `rec` keyword. See also `RecursiveDo`.
RecursiveDo | Allow recursive bindings in `do` blocks, using the `rec` keyword, or `mdo`, a variant of `do`.
ParallelListComp | Provide syntax for writing list comprehensions which iterate over several lists together, like the `zipWith` family of functions.
MultiParamTypeClasses | Allow multiple parameters in a type class.
MonomorphismRestriction | Enable the dreaded monomorphism restriction.
DeepSubsumption | Enable deep subsumption, relaxing the simple subsumption rules, implicitly inserting eta-expansions when matching up function types with different quantification structures.
FunctionalDependencies | 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.
Rank2Types | (deprecated) A synonym for `RankNTypes`. Old description: Like `RankNTypes` but does not allow a higher-rank type to itself appear on the left of a function arrow.
RankNTypes | Allow a universally-quantified type to occur on the left of a function arrow.
PolymorphicComponents | (deprecated) A synonym for `RankNTypes`. Old description: Allow data constructors to have polymorphic arguments. Unlike `RankNTypes`, does not allow this for ordinary functions.
ExistentialQuantification | Allow existentially-quantified data constructors.
ScopedTypeVariables | Cause a type variable in a signature, which has an explicit `forall` quantifier, to scope over the definition of the accompanying value declaration.
PatternSignatures | Deprecated, use `ScopedTypeVariables` instead.
ImplicitParams | Enable implicit function parameters with dynamic scope.
FlexibleContexts | Relax some restrictions on the form of the context of a type signature.
FlexibleInstances | Relax some restrictions on the form of the context of an instance declaration.
EmptyDataDecls | Allow data type declarations with no constructors.
CPP | Run the C preprocessor on Haskell source code.
KindSignatures | Allow an explicit kind signature giving the kind of types over which a type variable ranges.
BangPatterns | Enable a form of pattern which forces evaluation before an attempted match, and a form of strict `let`/`where` binding.
TypeSynonymInstances | Allow type synonyms in instance heads.
TemplateHaskell | Enable Template Haskell, a system for compile-time metaprogramming.
ForeignFunctionInterface | Enable the Foreign Function Interface. In GHC, implements the standard Haskell 98 Foreign Function Interface Addendum, plus some GHC-specific extensions.
Arrows | Enable arrow notation.
Generics | (deprecated) Enable generic type classes, with default instances defined in terms of the algebraic structure of a type.
ImplicitPrelude | 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.
NamedFieldPuns | Enable syntax for implicitly binding local names corresponding to the field names of a record. Puns bind specific names, unlike `RecordWildCards`.
PatternGuards | Enable a form of guard which matches a pattern and binds variables.
GeneralizedNewtypeDeriving | Allow a type declared with `newtype` to use `deriving` for any class with an instance for the underlying type.
GeneralisedNewtypeDeriving |
ExtensibleRecords | Enable the "Trex" extensible records system.
RestrictedTypeSynonyms | Enable type synonyms which are transparent in some definitions and opaque elsewhere, as a way of implementing abstract datatypes.
HereDocuments | Enable an alternate syntax for string literals, with string templating.
MagicHash | Allow the character `#` as a postfix modifier on identifiers. Also enables literal syntax for unboxed values.
TypeFamilies | Allow data types and type synonyms which are indexed by types, i.e. ad-hoc polymorphism for types.
StandaloneDeriving | Allow a standalone declaration which invokes the type class `deriving` mechanism.
UnicodeSyntax | Allow certain Unicode characters to stand for certain ASCII character sequences, e.g. keywords and punctuation.
UnliftedFFITypes | Allow the use of unboxed types as foreign types, e.g. in `foreign import` and `foreign export`.
InterruptibleFFI | Enable interruptible FFI.
CApiFFI | Allow use of CAPI FFI calling convention (`foreign import capi`).
LiberalTypeSynonyms | Defer validity checking of types until after expanding type synonyms, relaxing the constraints on how synonyms may be used.
TypeOperators | Allow the name of a type constructor, type class, or type variable to be an infix operator.
RecordWildCards | Enable syntax for implicitly binding local names corresponding to the field names of a record. A wildcard binds all unmentioned names, unlike `NamedFieldPuns`.
RecordPuns | Deprecated, use `NamedFieldPuns` instead.
DisambiguateRecordFields | Allow a record field name to be disambiguated by the type of the record it's in.
TraditionalRecordSyntax | Enable traditional record syntax (as supported by Haskell 98)
OverloadedStrings | Enable overloading of string literals using a type class, much like integer literals.
GADTs | Enable generalized algebraic data types, in which type variables may be instantiated on a per-constructor basis. Implies `GADTSyntax`.
GADTSyntax | Enable GADT syntax for declaring ordinary algebraic datatypes.
MonoPatBinds | (deprecated) Has no effect. Old description: Make pattern bindings monomorphic.
RelaxedPolyRec | Relax the requirements on mutually-recursive polymorphic functions.
ExtendedDefaultRules | Allow default instantiation of polymorphic types in more situations.
UnboxedTuples | Enable unboxed tuples.
DeriveDataTypeable | Enable `deriving` for classes `Typeable` and `Data`.
DeriveGeneric | Enable `deriving` for `Generic` and `Generic1`.
DefaultSignatures | Enable support for default signatures.
InstanceSigs | Allow type signatures to be specified in instance declarations.
ConstrainedClassMethods | Allow a class method's type to place additional constraints on a class type variable.

PackageImports

Allow imports to be qualified by the package name the module is intended to be imported from, e.g.

    import "network" Network.Socket

ImpredicativeTypes | (deprecated) Allow a type variable to be instantiated at a polymorphic type.
NewQualifiedOperators | (deprecated) Change the syntax for qualified infix operators.
PostfixOperators | Relax the interpretation of left operator sections to allow unary postfix operators.
QuasiQuotes | Enable quasi-quotation, a mechanism for defining new concrete syntax for expressions and patterns.
TransformListComp | Enable generalized list comprehensions, supporting operations such as sorting and grouping.
MonadComprehensions | Enable monad comprehensions, which generalise the list comprehension syntax to work for any monad.
ViewPatterns | Enable view patterns, which match a value by applying a function and matching on the result.
XmlSyntax | Allow concrete XML syntax to be used in expressions and patterns, as per the Haskell Server Pages extension language: http://www.haskell.org/haskellwiki/HSP. The ideas behind it are discussed in the paper "Haskell Server Pages through Dynamic Loading" by Niklas Broberg, from Haskell Workshop '05.
RegularPatterns | Allow regular pattern matching over lists, as discussed in the paper "Regular Expression Patterns" by Niklas Broberg, Andreas Farre and Josef Svenningsson, from ICFP '04.
TupleSections | Enable the use of tuple sections, e.g. `(, True)` desugars into `x -> (x, True)`.
GHCForeignImportPrim | Allow GHC primops, written in C--, to be imported into a Haskell file.
NPlusKPatterns | Support for patterns of the form `n + k`, where `k` is an integer literal.
DoAndIfThenElse | Improve the layout rule when `if` expressions are used in a `do` block.
MultiWayIf | Enable support for multi-way `if`-expressions.
LambdaCase | Enable support lambda-`case` expressions.
RebindableSyntax | Makes much of the Haskell sugar be desugared into calls to the function with a particular name that is in scope.
ExplicitForAll | Make `forall` a keyword in types, which can be used to give the generalisation explicitly.
DatatypeContexts | Allow contexts to be put on datatypes, e.g. the `Eq a` in `data Eq a => Set a = NilSet | ConsSet a (Set a)`.
MonoLocalBinds | Local (`let` and `where`) bindings are monomorphic.
DeriveFunctor | Enable `deriving` for the `Functor` class.
DeriveTraversable | Enable `deriving` for the `Traversable` class.
DeriveFoldable | Enable `deriving` for the `Foldable` class.
NondecreasingIndentation | Enable non-decreasing indentation for `do` blocks.

SafeImports

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

Safe | Compile a module in the Safe, Safe Haskell mode -- a restricted form of the Haskell language to ensure type safety.
Trustworthy | 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.
Unsafe | Compile a module in the Unsafe, Safe Haskell mode so that modules compiled using Safe, Safe Haskell mode can't import it.
ConstraintKinds | 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.
PolyKinds | Enable kind polymorphism.
DataKinds | Enable datatype promotion.
TypeData | Enable `type data` declarations, defining constructors at the type level.
ParallelArrays | Enable parallel arrays syntax (`[:`, `:]`) for Data Parallel Haskell.
RoleAnnotations | Enable explicit role annotations, like in (`type role Foo representational representational`).
OverloadedLists | Enable overloading of list literals, arithmetic sequences and list patterns using the `IsList` type class.
EmptyCase | Enable case expressions that have no alternatives. Also applies to lambda-case expressions if they are enabled.
AutoDeriveTypeable | (deprecated) Deprecated in favour of `DeriveDataTypeable`. Old description: Triggers the generation of derived `Typeable` instances for every datatype and type class declaration.
NegativeLiterals | Desugars negative literals directly (without using negate).
BinaryLiterals | Allow the use of binary integer literal syntax (e.g. `0b11001001` to denote `201`).
NumDecimals | Allow the use of floating literal syntax for all instances of `Num`, including `Int` and `Integer`.
NullaryTypeClasses | Enable support for type classes with no type parameter.
ExplicitNamespaces | Enable explicit namespaces in module import/export lists.
AllowAmbiguousTypes | Allow the user to write ambiguous types, and the type inference engine to infer them.
JavaScriptFFI | Enable `foreign import javascript`.
PatternSynonyms | Allow giving names to and abstracting over patterns.
PartialTypeSignatures | Allow anonymous placeholders (underscore) inside type signatures. The type inference engine will generate a message describing the type inferred at the hole's location.
NamedWildCards | Allow named placeholders written with a leading underscore inside type signatures. Wildcards with the same name unify to the same type.
DeriveAnyClass | Enable `deriving` for any class.
DeriveLift | Enable `deriving` for the `Lift` class.
StaticPointers | Enable support for 'static pointers' (and the `static` keyword) to refer to globally stable names, even across different programs.
StrictData | Switches data type declarations to be strict by default (as if they had a bang using `BangPatterns`), and allow opt-in field laziness using `~`.
Strict | Switches all pattern bindings to be strict by default (as if they had a bang using `BangPatterns`), ordinary patterns are recovered using `~`. Implies `StrictData`.
ApplicativeDo | Allows `do`-notation for types that are ``Applicative`` as well as ``Monad``. When enabled, desugaring `do` notation tries to use `(*)` and ``fmap`` and ``join`` as far as possible.
DuplicateRecordFields | Allow records to use duplicated field labels for accessors.
TypeApplications | Enable explicit type applications with the syntax `id @Int`.
TypeInType | Dissolve the distinction between types and kinds, allowing the compiler to reason about kind equality and therefore enabling GADTs to be promoted to the type-level.
UndecidableSuperClasses | Allow recursive (and therefore undecidable) super-class relationships.
MonadFailDesugaring | A temporary extension to help library authors check if their code will compile with the new planned desugaring of fail.
TemplateHaskellQuotes | A subset of `TemplateHaskell` including only quoting.
OverloadedLabels | Allows use of the `#label` syntax.
TypeFamilyDependencies | Allow functional dependency annotations on type families to declare them as injective.
DerivingStrategies | Allow multiple `deriving` clauses, each optionally qualified with a strategy.
DerivingVia | Enable deriving instances via types of the same runtime representation. Implies `DerivingStrategies`.
UnboxedSums | Enable the use of unboxed sum syntax.
HexFloatLiterals | Allow use of hexadecimal literal notation for floating-point values.
BlockArguments | Allow `do` blocks etc. in argument position.
NumericUnderscores | Allow use of underscores in numeric literals.
QuantifiedConstraints | Allow `forall` in constraints.
StarIsType | Have `*` refer to `Type`.
EmptyDataDeriving | Liberalises deriving to provide instances for empty data types.
CUSKs | Enable detection of complete user-supplied kind signatures.
ImportQualifiedPost | Allows the syntax `import M qualified`.
StandaloneKindSignatures | Allow the use of standalone kind signatures.
UnliftedNewtypes | Enable unlifted newtypes.
LexicalNegation | Use whitespace to determine whether the minus sign stands for negation or subtraction.
QualifiedDo | Enable qualified do-notation desugaring.
LinearTypes | Enable linear types.
RequiredTypeArguments | Allow the use of visible forall in types of terms.
FieldSelectors | Enable the generation of selector functions corresponding to record fields.
OverloadedRecordDot | Enable the use of record dot-accessor and updater syntax
OverloadedRecordUpdate | Provides record `.` syntax in record updates, e.g. `x {foo.bar = 1}`.
UnliftedDatatypes | Enable data types for which an unlifted or levity-polymorphic result kind is inferred.
ExtendedLiterals | Enable syntax for primitive numeric literals, e.g. `3#Int8`
AlternativeLayoutRule | Undocumented parsing-related extensions introduced in GHC 7.0.
AlternativeLayoutRuleTransitional | Undocumented parsing-related extensions introduced in GHC 7.0.
RelaxedLayout | Undocumented parsing-related extensions introduced in GHC 7.2.
TypeAbstractions | Allow the use of type abstraction syntax.
ListTuplePuns | Allow the use of built-in syntax for list, tuple and sum type constructors rather than being exclusive to data constructors.

#### Instances

Instances details

Pretty KnownExtension Source # |
Instance details Defined in Language.Haskell.Extension Methods pretty :: KnownExtension -> Doc Source # prettyVersioned :: CabalSpecVersion -> KnownExtension -> Doc Source #
Structured KnownExtension Source # |
Instance details Defined in Language.Haskell.Extension Methods structure :: Proxy KnownExtension -> Structure Source # structureHash' :: Tagged KnownExtension MD5
Binary KnownExtension Source # |
Instance details Defined in Language.Haskell.Extension Methods put :: KnownExtension -> Put Source # get :: Get KnownExtension Source # putList :: [KnownExtension] -> Put Source #
NFData KnownExtension Source # |
Instance details Defined in Language.Haskell.Extension Methods rnf :: KnownExtension -> () Source #
Data KnownExtension Source # |

Instance details

Defined in Language.Haskell.Extension

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> KnownExtension -> c KnownExtension #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c KnownExtension #

toConstr :: KnownExtension -> Constr #

dataTypeOf :: KnownExtension -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c KnownExtension) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c KnownExtension) #

gmapT :: (forall b. Data b => b -> b) -> KnownExtension -> KnownExtension #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> KnownExtension -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> KnownExtension -> r #

gmapQ :: (forall d. Data d => d -> u) -> KnownExtension -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> KnownExtension -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> KnownExtension -> m KnownExtension #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> KnownExtension -> m KnownExtension #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> KnownExtension -> m KnownExtension #

Bounded KnownExtension Source # |
Instance details Defined in Language.Haskell.Extension Methods minBound :: KnownExtension # maxBound :: KnownExtension #
Enum KnownExtension Source # |

Instance details

Defined in Language.Haskell.Extension

Methods

succ :: KnownExtension -> KnownExtension #

pred :: KnownExtension -> KnownExtension #

toEnum :: Int -> KnownExtension #

fromEnum :: KnownExtension -> Int #

enumFrom :: KnownExtension -> [KnownExtension] #

enumFromThen :: KnownExtension -> KnownExtension -> [KnownExtension] #

enumFromTo :: KnownExtension -> KnownExtension -> [KnownExtension] #

enumFromThenTo :: KnownExtension -> KnownExtension -> KnownExtension -> [KnownExtension] #

Generic KnownExtension Source # |

Instance details

Defined in Language.Haskell.Extension

Associated Types

type Rep KnownExtension |

Instance details

Defined in Language.Haskell.Extension

type Rep KnownExtension = D1 ('MetaData "KnownExtension" "Language.Haskell.Extension" "Cabal-syntax-3.12.1.0-5c0e" 'False) (((((((C1 ('MetaCons "OverlappingInstances" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "UndecidableInstances" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "IncoherentInstances" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DoRec" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "RecursiveDo" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ParallelListComp" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "MultiParamTypeClasses" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "MonomorphismRestriction" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DeepSubsumption" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "FunctionalDependencies" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Rank2Types" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "RankNTypes" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PolymorphicComponents" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "ExistentialQuantification" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ScopedTypeVariables" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "PatternSignatures" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ImplicitParams" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "FlexibleContexts" 'PrefixI 'False) (U1 :: Type -> Type)))))) :+: ((((C1 ('MetaCons "FlexibleInstances" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "EmptyDataDecls" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "CPP" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "KindSignatures" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "BangPatterns" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TypeSynonymInstances" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "TemplateHaskell" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ForeignFunctionInterface" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Arrows" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "Generics" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ImplicitPrelude" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "NamedFieldPuns" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "PatternGuards" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "GeneralizedNewtypeDeriving" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "GeneralisedNewtypeDeriving" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ExtensibleRecords" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "RestrictedTypeSynonyms" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "HereDocuments" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MagicHash" 'PrefixI 'False) (U1 :: Type -> Type))))))) :+: (((((C1 ('MetaCons "TypeFamilies" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "StandaloneDeriving" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "UnicodeSyntax" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "UnliftedFFITypes" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "InterruptibleFFI" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CApiFFI" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "LiberalTypeSynonyms" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "TypeOperators" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "RecordWildCards" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "RecordPuns" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DisambiguateRecordFields" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "TraditionalRecordSyntax" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "OverloadedStrings" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "GADTs" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "GADTSyntax" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "MonoPatBinds" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "RelaxedPolyRec" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ExtendedDefaultRules" 'PrefixI 'False) (U1 :: Type -> Type)))))) :+: ((((C1 ('MetaCons "UnboxedTuples" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DeriveDataTypeable" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "DeriveGeneric" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DefaultSignatures" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "InstanceSigs" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ConstrainedClassMethods" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "PackageImports" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ImpredicativeTypes" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NewQualifiedOperators" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "PostfixOperators" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "QuasiQuotes" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "TransformListComp" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "MonadComprehensions" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ViewPatterns" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "XmlSyntax" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "RegularPatterns" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "TupleSections" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "GHCForeignImportPrim" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NPlusKPatterns" 'PrefixI 'False) (U1 :: Type -> Type)))))))) :+: ((((((C1 ('MetaCons "DoAndIfThenElse" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MultiWayIf" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "LambdaCase" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "RebindableSyntax" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "ExplicitForAll" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DatatypeContexts" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "MonoLocalBinds" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "DeriveFunctor" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DeriveTraversable" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "DeriveFoldable" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NondecreasingIndentation" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "SafeImports" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Safe" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Trustworthy" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Unsafe" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ConstraintKinds" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "PolyKinds" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DataKinds" 'PrefixI 'False) (U1 :: Type -> Type)))))) :+: ((((C1 ('MetaCons "TypeData" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ParallelArrays" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "RoleAnnotations" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "OverloadedLists" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "EmptyCase" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "AutoDeriveTypeable" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "NegativeLiterals" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "BinaryLiterals" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NumDecimals" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "NullaryTypeClasses" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ExplicitNamespaces" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "AllowAmbiguousTypes" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "JavaScriptFFI" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PatternSynonyms" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "PartialTypeSignatures" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NamedWildCards" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "DeriveAnyClass" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "DeriveLift" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "StaticPointers" 'PrefixI 'False) (U1 :: Type -> Type))))))) :+: (((((C1 ('MetaCons "StrictData" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Strict" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ApplicativeDo" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DuplicateRecordFields" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "TypeApplications" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TypeInType" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "UndecidableSuperClasses" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "MonadFailDesugaring" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TemplateHaskellQuotes" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "OverloadedLabels" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TypeFamilyDependencies" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "DerivingStrategies" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "DerivingVia" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "UnboxedSums" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "HexFloatLiterals" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BlockArguments" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "NumericUnderscores" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "QuantifiedConstraints" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "StarIsType" 'PrefixI 'False) (U1 :: Type -> Type)))))) :+: ((((C1 ('MetaCons "EmptyDataDeriving" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CUSKs" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ImportQualifiedPost" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "StandaloneKindSignatures" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "UnliftedNewtypes" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "LexicalNegation" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "QualifiedDo" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "LinearTypes" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "RequiredTypeArguments" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "FieldSelectors" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "OverloadedRecordDot" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "OverloadedRecordUpdate" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "UnliftedDatatypes" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ExtendedLiterals" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "AlternativeLayoutRule" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "AlternativeLayoutRuleTransitional" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "RelaxedLayout" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "TypeAbstractions" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ListTuplePuns" 'PrefixI 'False) (U1 :: Type -> Type)))))))))

Methods

from :: KnownExtension -> Rep KnownExtension x #

to :: Rep KnownExtension x -> KnownExtension #

Read KnownExtension Source # |
Instance details Defined in Language.Haskell.Extension Methods readsPrec :: Int -> ReadS KnownExtension # readList :: ReadS [KnownExtension] # readPrec :: ReadPrec KnownExtension # readListPrec :: ReadPrec [KnownExtension] #
Show KnownExtension Source # |
Instance details Defined in Language.Haskell.Extension Methods showsPrec :: Int -> KnownExtension -> ShowS # show :: KnownExtension -> String # showList :: [KnownExtension] -> ShowS #
Eq KnownExtension Source # |
Instance details Defined in Language.Haskell.Extension Methods (==) :: KnownExtension -> KnownExtension -> Bool # (/=) :: KnownExtension -> KnownExtension -> Bool #
Ord KnownExtension Source # |

Instance details

Defined in Language.Haskell.Extension

Methods

compare :: KnownExtension -> KnownExtension -> Ordering #

(<) :: KnownExtension -> KnownExtension -> Bool #

(<=) :: KnownExtension -> KnownExtension -> Bool #

(>) :: KnownExtension -> KnownExtension -> Bool #

(>=) :: KnownExtension -> KnownExtension -> Bool #

max :: KnownExtension -> KnownExtension -> KnownExtension #

min :: KnownExtension -> KnownExtension -> KnownExtension #

type Rep KnownExtension Source # |

Instance details

Defined in Language.Haskell.Extension

type Rep KnownExtension = D1 ('MetaData "KnownExtension" "Language.Haskell.Extension" "Cabal-syntax-3.12.1.0-5c0e" 'False) (((((((C1 ('MetaCons "OverlappingInstances" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "UndecidableInstances" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "IncoherentInstances" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DoRec" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "RecursiveDo" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ParallelListComp" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "MultiParamTypeClasses" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "MonomorphismRestriction" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DeepSubsumption" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "FunctionalDependencies" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Rank2Types" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "RankNTypes" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PolymorphicComponents" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "ExistentialQuantification" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ScopedTypeVariables" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "PatternSignatures" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ImplicitParams" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "FlexibleContexts" 'PrefixI 'False) (U1 :: Type -> Type)))))) :+: ((((C1 ('MetaCons "FlexibleInstances" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "EmptyDataDecls" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "CPP" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "KindSignatures" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "BangPatterns" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TypeSynonymInstances" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "TemplateHaskell" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ForeignFunctionInterface" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Arrows" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "Generics" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ImplicitPrelude" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "NamedFieldPuns" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "PatternGuards" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "GeneralizedNewtypeDeriving" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "GeneralisedNewtypeDeriving" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ExtensibleRecords" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "RestrictedTypeSynonyms" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "HereDocuments" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MagicHash" 'PrefixI 'False) (U1 :: Type -> Type))))))) :+: (((((C1 ('MetaCons "TypeFamilies" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "StandaloneDeriving" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "UnicodeSyntax" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "UnliftedFFITypes" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "InterruptibleFFI" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CApiFFI" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "LiberalTypeSynonyms" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "TypeOperators" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "RecordWildCards" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "RecordPuns" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DisambiguateRecordFields" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "TraditionalRecordSyntax" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "OverloadedStrings" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "GADTs" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "GADTSyntax" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "MonoPatBinds" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "RelaxedPolyRec" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ExtendedDefaultRules" 'PrefixI 'False) (U1 :: Type -> Type)))))) :+: ((((C1 ('MetaCons "UnboxedTuples" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DeriveDataTypeable" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "DeriveGeneric" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DefaultSignatures" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "InstanceSigs" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ConstrainedClassMethods" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "PackageImports" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ImpredicativeTypes" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NewQualifiedOperators" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "PostfixOperators" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "QuasiQuotes" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "TransformListComp" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "MonadComprehensions" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ViewPatterns" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "XmlSyntax" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "RegularPatterns" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "TupleSections" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "GHCForeignImportPrim" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NPlusKPatterns" 'PrefixI 'False) (U1 :: Type -> Type)))))))) :+: ((((((C1 ('MetaCons "DoAndIfThenElse" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MultiWayIf" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "LambdaCase" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "RebindableSyntax" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "ExplicitForAll" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DatatypeContexts" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "MonoLocalBinds" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "DeriveFunctor" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DeriveTraversable" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "DeriveFoldable" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NondecreasingIndentation" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "SafeImports" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Safe" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Trustworthy" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Unsafe" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ConstraintKinds" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "PolyKinds" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DataKinds" 'PrefixI 'False) (U1 :: Type -> Type)))))) :+: ((((C1 ('MetaCons "TypeData" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ParallelArrays" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "RoleAnnotations" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "OverloadedLists" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "EmptyCase" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "AutoDeriveTypeable" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "NegativeLiterals" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "BinaryLiterals" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NumDecimals" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "NullaryTypeClasses" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ExplicitNamespaces" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "AllowAmbiguousTypes" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "JavaScriptFFI" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "PatternSynonyms" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "PartialTypeSignatures" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "NamedWildCards" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "DeriveAnyClass" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "DeriveLift" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "StaticPointers" 'PrefixI 'False) (U1 :: Type -> Type))))))) :+: (((((C1 ('MetaCons "StrictData" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Strict" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ApplicativeDo" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DuplicateRecordFields" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "TypeApplications" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TypeInType" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "UndecidableSuperClasses" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "MonadFailDesugaring" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TemplateHaskellQuotes" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "OverloadedLabels" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "TypeFamilyDependencies" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "DerivingStrategies" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "DerivingVia" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "UnboxedSums" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "HexFloatLiterals" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "BlockArguments" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "NumericUnderscores" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "QuantifiedConstraints" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "StarIsType" 'PrefixI 'False) (U1 :: Type -> Type)))))) :+: ((((C1 ('MetaCons "EmptyDataDeriving" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "CUSKs" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "ImportQualifiedPost" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "StandaloneKindSignatures" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "UnliftedNewtypes" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "LexicalNegation" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "QualifiedDo" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "LinearTypes" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "RequiredTypeArguments" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "FieldSelectors" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "OverloadedRecordDot" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "OverloadedRecordUpdate" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "UnliftedDatatypes" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ExtendedLiterals" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "AlternativeLayoutRule" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "AlternativeLayoutRuleTransitional" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "RelaxedLayout" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "TypeAbstractions" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "ListTuplePuns" 'PrefixI 'False) (U1 :: Type -> Type)))))))))

deprecatedExtensions :: [(Extension, Maybe Extension)] Source #

Extensions that have been deprecated, possibly paired with another extension that replaces it.

classifyExtension :: String -> Extension Source #

knownExtensions :: [KnownExtension] Source #