+ ( "do-eta-reduction", Opt_DoEtaReduction ),
+ ( "case-merge", Opt_CaseMerge ),
+ ( "unbox-strict-fields", Opt_UnboxStrictFields ),
+ ( "dicts-cheap", Opt_DictsCheap ),
+ ( "excess-precision", Opt_ExcessPrecision ),
+ ( "asm-mangling", Opt_DoAsmMangling ),
+ ( "print-bind-result", Opt_PrintBindResult ),
+ ( "force-recomp", Opt_ForceRecomp ),
+ ( "hpc-no-auto", Opt_Hpc_No_Auto ),
+ ( "rewrite-rules", Opt_RewriteRules ),
+ ( "break-on-exception", Opt_BreakOnException ),
+ ( "vectorise", Opt_Vectorise ),
+ ( "regs-graph", Opt_RegsGraph),
+ -- Deprecated in favour of -XTemplateHaskell:
+ ( "th", Opt_TemplateHaskell ),
+ -- Deprecated in favour of -XForeignFunctionInterface:
+ ( "fi", Opt_ForeignFunctionInterface ),
+ -- Deprecated in favour of -XForeignFunctionInterface:
+ ( "ffi", Opt_ForeignFunctionInterface ),
+ -- Deprecated in favour of -XArrows:
+ ( "arrows", Opt_Arrows ),
+ -- Deprecated in favour of -XGenerics:
+ ( "generics", Opt_Generics ),
+ -- Deprecated in favour of -XImplicitPrelude:
+ ( "implicit-prelude", Opt_ImplicitPrelude ),
+ -- Deprecated in favour of -XBangPatterns:
+ ( "bang-patterns", Opt_BangPatterns ),
+ -- Deprecated in favour of -XMonomorphismRestriction:
+ ( "monomorphism-restriction", Opt_MonomorphismRestriction ),
+ -- Deprecated in favour of -XMonoPatBinds:
+ ( "mono-pat-binds", Opt_MonoPatBinds ),
+ -- Deprecated in favour of -XExtendedDefaultRules:
+ ( "extended-default-rules", Opt_ExtendedDefaultRules ),
+ -- Deprecated in favour of -XImplicitParams:
+ ( "implicit-params", Opt_ImplicitParams ),
+ -- Deprecated in favour of -XScopedTypeVariables:
+ ( "scoped-type-variables", Opt_ScopedTypeVariables ),
+ -- Deprecated in favour of -XPArr:
+ ( "parr", Opt_PArr ),
+ -- Deprecated in favour of -XOverlappingInstances:
+ ( "allow-overlapping-instances", Opt_OverlappingInstances ),
+ -- Deprecated in favour of -XUndecidableInstances:
+ ( "allow-undecidable-instances", Opt_UndecidableInstances ),
+ -- Deprecated in favour of -XIncoherentInstances:
+ ( "allow-incoherent-instances", Opt_IncoherentInstances )
+ ]
+
+supportedLanguages :: [String]
+supportedLanguages = map fst xFlags
+
+-- These -X<blah> flags can all be reversed with -XNo<blah>
+xFlags :: [(String, DynFlag)]
+xFlags = [
+ ( "CPP", Opt_Cpp ),
+ ( "PatternGuards", Opt_PatternGuards ),
+ ( "UnicodeSyntax", Opt_UnicodeSyntax ),
+ ( "MagicHash", Opt_MagicHash ),
+ ( "PolymorphicComponents", Opt_PolymorphicComponents ),
+ ( "ExistentialQuantification", Opt_ExistentialQuantification ),
+ ( "KindSignatures", Opt_KindSignatures ),
+ ( "PatternSignatures", Opt_PatternSignatures ),
+ ( "EmptyDataDecls", Opt_EmptyDataDecls ),
+ ( "ParallelListComp", Opt_ParallelListComp ),
+ ( "ForeignFunctionInterface", Opt_ForeignFunctionInterface ),
+ ( "UnliftedFFITypes", Opt_UnliftedFFITypes ),
+ ( "PartiallyAppliedClosedTypeSynonyms",
+ Opt_PartiallyAppliedClosedTypeSynonyms ),
+ ( "Rank2Types", Opt_Rank2Types ),
+ ( "RankNTypes", Opt_RankNTypes ),
+ ( "TypeOperators", Opt_TypeOperators ),
+ ( "RecursiveDo", Opt_RecursiveDo ),
+ ( "Arrows", Opt_Arrows ),
+ ( "PArr", Opt_PArr ),
+ ( "TemplateHaskell", Opt_TemplateHaskell ),
+ ( "Generics", Opt_Generics ),
+ -- On by default:
+ ( "ImplicitPrelude", Opt_ImplicitPrelude ),
+ ( "RecordWildCards", Opt_RecordWildCards ),
+ ( "RecordPuns", Opt_RecordPuns ),
+ ( "DisambiguateRecordFields", Opt_DisambiguateRecordFields ),
+ ( "OverloadedStrings", Opt_OverloadedStrings ),
+ ( "GADTs", Opt_GADTs ),
+ ( "TypeFamilies", Opt_TypeFamilies ),
+ ( "BangPatterns", Opt_BangPatterns ),
+ -- On by default:
+ ( "MonomorphismRestriction", Opt_MonomorphismRestriction ),
+ -- On by default (which is not strictly H98):
+ ( "MonoPatBinds", Opt_MonoPatBinds ),
+ ( "RelaxedPolyRec", Opt_RelaxedPolyRec),
+ ( "ExtendedDefaultRules", Opt_ExtendedDefaultRules ),
+ ( "ImplicitParams", Opt_ImplicitParams ),
+ ( "ScopedTypeVariables", Opt_ScopedTypeVariables ),
+ ( "UnboxedTuples", Opt_UnboxedTuples ),
+ ( "StandaloneDeriving", Opt_StandaloneDeriving ),
+ ( "DeriveDataTypeable", Opt_DeriveDataTypeable ),
+ ( "TypeSynonymInstances", Opt_TypeSynonymInstances ),
+ ( "FlexibleContexts", Opt_FlexibleContexts ),
+ ( "FlexibleInstances", Opt_FlexibleInstances ),
+ ( "ConstrainedClassMethods", Opt_ConstrainedClassMethods ),
+ ( "MultiParamTypeClasses", Opt_MultiParamTypeClasses ),
+ ( "FunctionalDependencies", Opt_FunctionalDependencies ),
+ ( "GeneralizedNewtypeDeriving", Opt_GeneralizedNewtypeDeriving ),
+ ( "OverlappingInstances", Opt_OverlappingInstances ),
+ ( "UndecidableInstances", Opt_UndecidableInstances ),
+ ( "IncoherentInstances", Opt_IncoherentInstances )