GHC.Driver.Flags

ghc-9.14.0.20251028: The GHC API

Safe Haskell | None
Language | GHC2021

GHC.Driver.Flags

Contents

- Warnings

Synopsis

- data DumpFlag
  - = Opt_D_dump_cmm
  - | Opt_D_dump_cmm_from_stg
  - | Opt_D_dump_cmm_raw
  - | Opt_D_dump_cmm_verbose_by_proc
  - | Opt_D_dump_cmm_verbose
  - | Opt_D_dump_cmm_cfg
  - | Opt_D_dump_cmm_cbe
  - | Opt_D_dump_cmm_switch
  - | Opt_D_dump_cmm_proc
  - | Opt_D_dump_cmm_sp
  - | Opt_D_dump_cmm_sink
  - | Opt_D_dump_cmm_caf
  - | Opt_D_dump_cmm_procmap
  - | Opt_D_dump_cmm_split
  - | Opt_D_dump_cmm_info
  - | Opt_D_dump_cmm_cps
  - | Opt_D_dump_cmm_thread_sanitizer
  - | Opt_D_dump_cfg_weights
  - | Opt_D_dump_asm
  - | Opt_D_dump_asm_native
  - | Opt_D_dump_asm_liveness
  - | Opt_D_dump_asm_regalloc
  - | Opt_D_dump_asm_regalloc_stages
  - | Opt_D_dump_asm_conflicts
  - | Opt_D_dump_asm_stats
  - | Opt_D_dump_c_backend
  - | Opt_D_dump_llvm
  - | Opt_D_dump_js
  - | Opt_D_dump_core_stats
  - | Opt_D_dump_deriv
  - | Opt_D_dump_ds
  - | Opt_D_dump_ds_preopt
  - | Opt_D_dump_foreign
  - | Opt_D_dump_inlinings
  - | Opt_D_dump_verbose_inlinings
  - | Opt_D_dump_rule_firings
  - | Opt_D_dump_rule_rewrites
  - | Opt_D_dump_simpl_trace
  - | Opt_D_dump_occur_anal
  - | Opt_D_dump_parsed
  - | Opt_D_dump_parsed_ast
  - | Opt_D_dump_rn
  - | Opt_D_dump_rn_ast
  - | Opt_D_dump_simpl
  - | Opt_D_dump_simpl_iterations
  - | Opt_D_dump_spec
  - | Opt_D_dump_spec_constr
  - | Opt_D_dump_prep
  - | Opt_D_dump_late_cc
  - | Opt_D_dump_stg_from_core
  - | Opt_D_dump_stg_unarised
  - | Opt_D_dump_stg_cg
  - | Opt_D_dump_stg_tags
  - | Opt_D_dump_stg_final
  - | Opt_D_dump_stg_from_js_sinker
  - | Opt_D_dump_call_arity
  - | Opt_D_dump_exitify
  - | Opt_D_dump_dmdanal
  - | Opt_D_dump_dmd_signatures
  - | Opt_D_dump_cpranal
  - | Opt_D_dump_cpr_signatures
  - | Opt_D_dump_tc
  - | Opt_D_dump_tc_ast
  - | Opt_D_dump_hie
  - | Opt_D_dump_types
  - | Opt_D_dump_rules
  - | Opt_D_dump_cse
  - | Opt_D_dump_float_out
  - | Opt_D_dump_float_in
  - | Opt_D_dump_liberate_case
  - | Opt_D_dump_static_argument_transformation
  - | Opt_D_dump_worker_wrapper
  - | Opt_D_dump_rn_trace
  - | Opt_D_dump_rn_stats
  - | Opt_D_dump_opt_cmm
  - | Opt_D_dump_simpl_stats
  - | Opt_D_dump_cs_trace
  - | Opt_D_dump_tc_trace
  - | Opt_D_dump_ec_trace
  - | Opt_D_dump_if_trace
  - | Opt_D_dump_splices
  - | Opt_D_th_dec_file
  - | Opt_D_dump_BCOs
  - | Opt_D_dump_ticked
  - | Opt_D_dump_rtti
  - | Opt_D_source_stats
  - | Opt_D_verbose_stg2stg
  - | Opt_D_dump_hi
  - | Opt_D_dump_hi_diffs
  - | Opt_D_dump_mod_cycles
  - | Opt_D_dump_mod_map
  - | Opt_D_dump_timings
  - | Opt_D_dump_view_pattern_commoning
  - | Opt_D_verbose_core2core
  - | Opt_D_dump_debug
  - | Opt_D_dump_json
  - | Opt_D_ppr_debug
  - | Opt_D_no_debug_output
  - | Opt_D_dump_faststrings
  - | Opt_D_faststring_stats
  - | Opt_D_ipe_stats
- getDumpFlagFrom :: (a -> Int) -> (a -> EnumSet DumpFlag) -> DumpFlag -> a -> Bool
- enabledIfVerbose :: DumpFlag -> Bool
- data GeneralFlag
  - = Opt_DumpToFile
  - | Opt_DumpWithWays
  - | Opt_D_dump_minimal_imports
  - | Opt_DoCoreLinting
  - | Opt_DoLinearCoreLinting
  - | Opt_DoStgLinting
  - | Opt_DoCmmLinting
  - | Opt_DoAsmLinting
  - | Opt_DoAnnotationLinting
  - | Opt_DoBoundsChecking
  - | Opt_AddBcoName
  - | Opt_NoLlvmMangler
  - | Opt_FastLlvm
  - | Opt_NoTypeableBinds
  - | Opt_DistinctConstructorTables
  - | Opt_InfoTableMap
  - | Opt_InfoTableMapWithFallback
  - | Opt_InfoTableMapWithStack
  - | Opt_WarnIsError
  - | Opt_ShowWarnGroups
  - | Opt_HideSourcePaths
  - | Opt_PrintExplicitForalls
  - | Opt_PrintExplicitKinds
  - | Opt_PrintExplicitCoercions
  - | Opt_PrintExplicitRuntimeReps
  - | Opt_PrintEqualityRelations
  - | Opt_PrintAxiomIncomps
  - | Opt_PrintUnicodeSyntax
  - | Opt_PrintExpandedSynonyms
  - | Opt_PrintPotentialInstances
  - | Opt_PrintRedundantPromotionTicks
  - | Opt_PrintTypecheckerElaboration
  - | Opt_CallArity
  - | Opt_Exitification
  - | Opt_Strictness
  - | Opt_LateDmdAnal
  - | Opt_KillAbsence
  - | Opt_KillOneShot
  - | Opt_FullLaziness
  - | Opt_FloatIn
  - | Opt_LocalFloatOut
  - | Opt_LocalFloatOutTopLevel
  - | Opt_LateSpecialise
  - | Opt_Specialise
  - | Opt_SpecialiseAggressively
  - | Opt_CrossModuleSpecialise
  - | Opt_PolymorphicSpecialisation
  - | Opt_InlineGenerics
  - | Opt_InlineGenericsAggressively
  - | Opt_StaticArgumentTransformation
  - | Opt_CSE
  - | Opt_StgCSE
  - | Opt_StgLiftLams
  - | Opt_LiberateCase
  - | Opt_SpecConstr
  - | Opt_SpecConstrKeen
  - | Opt_SpecialiseIncoherents
  - | Opt_DoLambdaEtaExpansion
  - | Opt_DoCleverArgEtaExpansion
  - | Opt_IgnoreAsserts
  - | Opt_DoEtaReduction
  - | Opt_CaseMerge
  - | Opt_CaseFolding
  - | Opt_UnboxStrictFields
  - | Opt_UnboxSmallStrictFields
  - | Opt_DictsCheap
  - | Opt_EnableRewriteRules
  - | Opt_EnableThSpliceWarnings
  - | Opt_RegsGraph
  - | Opt_RegsIterative
  - | Opt_PedanticBottoms
  - | Opt_LlvmFillUndefWithGarbage
  - | Opt_IrrefutableTuples
  - | Opt_CmmSink
  - | Opt_CmmStaticPred
  - | Opt_CmmElimCommonBlocks
  - | Opt_CmmControlFlow
  - | Opt_AsmShortcutting
  - | Opt_InterModuleFarJumps
  - | Opt_OmitYields
  - | Opt_FunToThunk
  - | Opt_DictsStrict
  - | Opt_DmdTxDictSel
  - | Opt_Loopification
  - | Opt_CfgBlocklayout
  - | Opt_WeightlessBlocklayout
  - | Opt_CprAnal
  - | Opt_WorkerWrapper
  - | Opt_WorkerWrapperUnlift
  - | Opt_SolveConstantDicts
  - | Opt_AlignmentSanitisation
  - | Opt_CatchNonexhaustiveCases
  - | Opt_NumConstantFolding
  - | Opt_CoreConstantFolding
  - | Opt_FastPAPCalls
  - | Opt_SpecEval
  - | Opt_SpecEvalDictFun
  - | Opt_DoTagInferenceChecks
  - | Opt_SimplPreInlining
  - | Opt_IgnoreInterfacePragmas
  - | Opt_OmitInterfacePragmas
  - | Opt_ExposeAllUnfoldings
  - | Opt_ExposeOverloadedUnfoldings
  - | Opt_KeepAutoRules
  - | Opt_WriteInterface
  - | Opt_WriteSelfRecompInfo
  - | Opt_WriteSelfRecompFlags
  - | Opt_WriteHie
  - | Opt_DisableJsMinifier
  - | Opt_DisableJsCsources
  - | Opt_AutoSccsOnIndividualCafs
  - | Opt_ProfCountEntries
  - | Opt_ProfLateInlineCcs
  - | Opt_ProfLateCcs
  - | Opt_ProfLateOverloadedCcs
  - | Opt_ProfLateoverloadedCallsCCs
  - | Opt_ProfManualCcs
  - | Opt_Pp
  - | Opt_ForceRecomp
  - | Opt_IgnoreOptimChanges
  - | Opt_IgnoreHpcChanges
  - | Opt_ExcessPrecision
  - | Opt_EagerBlackHoling
  - | Opt_OrigThunkInfo
  - | Opt_NoHsMain
  - | Opt_SplitSections
  - | Opt_StgStats
  - | Opt_HideAllPackages
  - | Opt_HideAllPluginPackages
  - | Opt_PrintBindResult
  - | Opt_Haddock
  - | Opt_HaddockOptions
  - | Opt_BreakOnException
  - | Opt_BreakOnError
  - | Opt_PrintEvldWithShow
  - | Opt_PrintBindContents
  - | Opt_GenManifest
  - | Opt_EmbedManifest
  - | Opt_SharedImplib
  - | Opt_BuildingCabalPackage
  - | Opt_IgnoreDotGhci
  - | Opt_GhciSandbox
  - | Opt_InsertBreakpoints
  - | Opt_GhciHistory
  - | Opt_GhciLeakCheck
  - | Opt_ValidateHie
  - | Opt_LocalGhciHistory
  - | Opt_NoIt
  - | Opt_GhciBrowser
  - | Opt_GhciBrowserRedirectWasiConsole
  - | Opt_GhciDoLoadTargets
  - | Opt_HelpfulErrors
  - | Opt_DeferTypeErrors
  - | Opt_DeferTypedHoles
  - | Opt_DeferOutOfScopeVariables
  - | Opt_PIC
  - | Opt_PIE
  - | Opt_PICExecutable
  - | Opt_ExternalDynamicRefs
  - | Opt_Ticky
  - | Opt_Ticky_Allocd
  - | Opt_Ticky_LNE
  - | Opt_Ticky_Dyn_Thunk
  - | Opt_Ticky_Tag
  - | Opt_Ticky_AP
  - | Opt_CmmThreadSanitizer
  - | Opt_RPath
  - | Opt_RelativeDynlibPaths
  - | Opt_CompactUnwind
  - | Opt_Hpc
  - | Opt_FamAppCache
  - | Opt_ExternalInterpreter
  - | Opt_OptimalApplicativeDo
  - | Opt_VersionMacros
  - | Opt_WholeArchiveHsLibs
  - | Opt_SingleLibFolder
  - | Opt_ExposeInternalSymbols
  - | Opt_KeepCAFs
  - | Opt_KeepGoing
  - | Opt_ByteCode
  - | Opt_ByteCodeAndObjectCode
  - | Opt_UnoptimizedCoreForInterpreter
  - | Opt_LinkRts
  - | Opt_ErrorSpans
  - | Opt_DeferDiagnostics
  - | Opt_DiagnosticsAsJSON
  - | Opt_DiagnosticsShowCaret
  - | Opt_PprCaseAsLet
  - | Opt_PprShowTicks
  - | Opt_ShowHoleConstraints
  - | Opt_ShowValidHoleFits
  - | Opt_SortValidHoleFits
  - | Opt_SortBySizeHoleFits
  - | Opt_SortBySubsumHoleFits
  - | Opt_AbstractRefHoleFits
  - | Opt_UnclutterValidHoleFits
  - | Opt_ShowTypeAppOfHoleFits
  - | Opt_ShowTypeAppVarsOfHoleFits
  - | Opt_ShowDocsOfHoleFits
  - | Opt_ShowTypeOfHoleFits
  - | Opt_ShowProvOfHoleFits
  - | Opt_ShowMatchesOfHoleFits
  - | Opt_ShowLoadedModules
  - | Opt_HexWordLiterals
  - | Opt_SuppressCoercions
  - | Opt_SuppressCoercionTypes
  - | Opt_SuppressVarKinds
  - | Opt_SuppressModulePrefixes
  - | Opt_SuppressTypeApplications
  - | Opt_SuppressIdInfo
  - | Opt_SuppressUnfoldings
  - | Opt_SuppressTypeSignatures
  - | Opt_SuppressUniques
  - | Opt_SuppressStgExts
  - | Opt_SuppressStgReps
  - | Opt_SuppressTicks
  - | Opt_SuppressTimestamps
  - | Opt_SuppressCoreSizes
  - | Opt_ShowErrorContext
  - | Opt_ObjectDeterminism
  - | Opt_AutoLinkPackages
  - | Opt_ImplicitImportQualified
  - | Opt_KeepHscppFiles
  - | Opt_KeepHiDiffs
  - | Opt_KeepHcFiles
  - | Opt_KeepSFiles
  - | Opt_KeepTmpFiles
  - | Opt_KeepRawTokenStream
  - | Opt_KeepLlvmFiles
  - | Opt_KeepHiFiles
  - | Opt_KeepOFiles
  - | Opt_BuildDynamicToo
  - | Opt_WriteIfSimplifiedCore
  - | Opt_UseBytecodeRatherThanObjects
  - | Opt_DistrustAllPackages
  - | Opt_PackageTrust
  - | Opt_PluginTrustworthy
  - | Opt_G_NoStateHack
  - | Opt_G_NoOptCoercion
- data Language
  - = Haskell98
  - | Haskell2010
  - | GHC2021
  - | GHC2024
- defaultLanguage :: Language
- optimisationFlags :: EnumSet GeneralFlag
- codeGenFlags :: EnumSet GeneralFlag
- data WarningGroup
  - = W_compat
  - | W_unused_binds
  - | W_extended_warnings
  - | W_default
  - | W_extra
  - | W_all
  - | W_everything
- warningGroupName :: WarningGroup -> String
- warningGroupFlags :: WarningGroup -> [WarningFlag]
- warningGroupIncludesExtendedWarnings :: WarningGroup -> Bool
- data WarningFlag
  - = Opt_WarnDuplicateExports
  - | Opt_WarnDuplicateConstraints
  - | Opt_WarnRedundantConstraints
  - | Opt_WarnHiShadows
  - | Opt_WarnImplicitPrelude
  - | Opt_WarnIncompletePatterns
  - | Opt_WarnIncompleteUniPatterns
  - | Opt_WarnIncompletePatternsRecUpd
  - | Opt_WarnOverflowedLiterals
  - | Opt_WarnEmptyEnumerations
  - | Opt_WarnMissingFields
  - | Opt_WarnMissingImportList
  - | Opt_WarnMissingMethods
  - | Opt_WarnMissingSignatures
  - | Opt_WarnMissingLocalSignatures
  - | Opt_WarnNameShadowing
  - | Opt_WarnOverlappingPatterns
  - | Opt_WarnTypeDefaults
  - | Opt_WarnMonomorphism
  - | Opt_WarnUnusedTopBinds
  - | Opt_WarnUnusedLocalBinds
  - | Opt_WarnUnusedPatternBinds
  - | Opt_WarnUnusedImports
  - | Opt_WarnUnusedMatches
  - | Opt_WarnUnusedTypePatterns
  - | Opt_WarnUnusedForalls
  - | Opt_WarnUnusedRecordWildcards
  - | Opt_WarnRedundantBangPatterns
  - | Opt_WarnRedundantRecordWildcards
  - | Opt_WarnDeprecatedFlags
  - | Opt_WarnMissingMonadFailInstances
  - | Opt_WarnSemigroup
  - | Opt_WarnDodgyExports
  - | Opt_WarnDodgyImports
  - | Opt_WarnOrphans
  - | Opt_WarnAutoOrphans
  - | Opt_WarnIdentities
  - | Opt_WarnTabs
  - | Opt_WarnUnrecognisedPragmas
  - | Opt_WarnMisplacedPragmas
  - | Opt_WarnDodgyForeignImports
  - | Opt_WarnUnusedDoBind
  - | Opt_WarnWrongDoBind
  - | Opt_WarnAlternativeLayoutRuleTransitional
  - | Opt_WarnUnsafe
  - | Opt_WarnSafe
  - | Opt_WarnTrustworthySafe
  - | Opt_WarnMissedSpecs
  - | Opt_WarnAllMissedSpecs
  - | Opt_WarnUnsupportedCallingConventions
  - | Opt_WarnUnsupportedLlvmVersion
  - | Opt_WarnMissedExtraSharedLib
  - | Opt_WarnInlineRuleShadowing
  - | Opt_WarnTypedHoles
  - | Opt_WarnPartialTypeSignatures
  - | Opt_WarnMissingExportedSignatures
  - | Opt_WarnUntickedPromotedConstructors
  - | Opt_WarnDerivingTypeable
  - | Opt_WarnDeferredTypeErrors
  - | Opt_WarnDeferredOutOfScopeVariables
  - | Opt_WarnNonCanonicalMonadInstances
  - | Opt_WarnNonCanonicalMonadFailInstances
  - | Opt_WarnNonCanonicalMonoidInstances
  - | Opt_WarnMissingPatternSynonymSignatures
  - | Opt_WarnUnrecognisedWarningFlags
  - | Opt_WarnSimplifiableClassConstraints
  - | Opt_WarnCPPUndef
  - | Opt_WarnUnbangedStrictPatterns
  - | Opt_WarnMissingHomeModules
  - | Opt_WarnPartialFields
  - | Opt_WarnMissingExportList
  - | Opt_WarnInaccessibleCode
  - | Opt_WarnStarIsType
  - | Opt_WarnStarBinder
  - | Opt_WarnImplicitKindVars
  - | Opt_WarnSpaceAfterBang
  - | Opt_WarnMissingDerivingStrategies
  - | Opt_WarnPrepositiveQualifiedModule
  - | Opt_WarnUnusedPackages
  - | Opt_WarnInferredSafeImports
  - | Opt_WarnMissingSafeHaskellMode
  - | Opt_WarnCompatUnqualifiedImports
  - | Opt_WarnDerivingDefaults
  - | Opt_WarnInvalidHaddock
  - | Opt_WarnOperatorWhitespaceExtConflict
  - | Opt_WarnOperatorWhitespace
  - | Opt_WarnAmbiguousFields
  - | Opt_WarnImplicitLift
  - | Opt_WarnMissingKindSignatures
  - | Opt_WarnMissingPolyKindSignatures
  - | Opt_WarnMissingExportedPatternSynonymSignatures
  - | Opt_WarnRedundantStrictnessFlags
  - | Opt_WarnForallIdentifier
  - | Opt_WarnUnicodeBidirectionalFormatCharacters
  - | Opt_WarnGADTMonoLocalBinds
  - | Opt_WarnTypeEqualityOutOfScope
  - | Opt_WarnTypeEqualityRequiresOperators
  - | Opt_WarnLoopySuperclassSolve
  - | Opt_WarnTermVariableCapture
  - | Opt_WarnMissingRoleAnnotations
  - | Opt_WarnImplicitRhsQuantification
  - | Opt_WarnIncompleteExportWarnings
  - | Opt_WarnIncompleteRecordSelectors
  - | Opt_WarnBadlyLevelledTypes
  - | Opt_WarnInconsistentFlags
  - | Opt_WarnDataKindsTC
  - | Opt_WarnDefaultedExceptionContext
  - | Opt_WarnViewPatternSignatures
  - | Opt_WarnUselessSpecialisations
  - | Opt_WarnDeprecatedPragmas
  - | Opt_WarnRuleLhsEqualities
  - | Opt_WarnUnusableUnpackPragmas
  - | Opt_WarnPatternNamespaceSpecifier
- warnFlagNames :: WarningFlag -> NonEmpty String
- warningGroups :: [WarningGroup]
- warningHierarchies :: [[WarningGroup]]
- smallestWarningGroups :: WarningFlag -> [WarningGroup]
- smallestWarningGroupsForCategory :: [WarningGroup]
- standardWarnings :: [WarningFlag]
- minusWOpts :: [WarningFlag]
- minusWallOpts :: [WarningFlag]
- minusWeverythingOpts :: [WarningFlag]
- minusWcompatOpts :: [WarningFlag]
- unusedBindsFlags :: [WarningFlag]
- data OnOff a
  - = On a
  - | Off a
- type TurnOnFlag = Bool
- turnOn :: TurnOnFlag
- turnOff :: TurnOnFlag
- impliedXFlags :: [(Extension, OnOff Extension)]
- validHoleFitsImpliedGFlags :: [(GeneralFlag, TurnOnFlag, GeneralFlag)]
- impliedGFlags :: [(GeneralFlag, TurnOnFlag, GeneralFlag)]
- impliedOffGFlags :: [(GeneralFlag, TurnOnFlag, GeneralFlag)]
- glasgowExtsFlags :: [Extension]
- data ExtensionDeprecation
  - = ExtensionNotDeprecated
  - | ExtensionDeprecatedFor [Extension]
  - | ExtensionFlagDeprecatedCond TurnOnFlag String
  - | ExtensionFlagDeprecated String
- data Deprecation
  - = NotDeprecated
  - | Deprecated
- extensionDeprecation :: Extension -> ExtensionDeprecation
- deprecation :: ExtensionDeprecation -> Deprecation
- extensionNames :: Extension -> [(ExtensionDeprecation, String)]
- extensionName :: Extension -> String

# Documentation

data DumpFlag Source #

Debugging flags

Constructors

Opt_D_dump_cmm |
Opt_D_dump_cmm_from_stg |
Opt_D_dump_cmm_raw |
Opt_D_dump_cmm_verbose_by_proc |
Opt_D_dump_cmm_verbose | same as -ddump-cmm-verbose-by-proc but writes each stage to a separate file (if used with -ddump-to-file)
Opt_D_dump_cmm_cfg |
Opt_D_dump_cmm_cbe |
Opt_D_dump_cmm_switch |
Opt_D_dump_cmm_proc |
Opt_D_dump_cmm_sp |
Opt_D_dump_cmm_sink |
Opt_D_dump_cmm_caf |
Opt_D_dump_cmm_procmap |
Opt_D_dump_cmm_split |
Opt_D_dump_cmm_info |
Opt_D_dump_cmm_cps |
Opt_D_dump_cmm_thread_sanitizer |
Opt_D_dump_cfg_weights | Dump the cfg used for block layout.
Opt_D_dump_asm |
Opt_D_dump_asm_native |
Opt_D_dump_asm_liveness |
Opt_D_dump_asm_regalloc |
Opt_D_dump_asm_regalloc_stages |
Opt_D_dump_asm_conflicts |
Opt_D_dump_asm_stats |
Opt_D_dump_c_backend |
Opt_D_dump_llvm |
Opt_D_dump_js |
Opt_D_dump_core_stats |
Opt_D_dump_deriv |
Opt_D_dump_ds |
Opt_D_dump_ds_preopt |
Opt_D_dump_foreign |
Opt_D_dump_inlinings |
Opt_D_dump_verbose_inlinings |
Opt_D_dump_rule_firings |
Opt_D_dump_rule_rewrites |
Opt_D_dump_simpl_trace |
Opt_D_dump_occur_anal |
Opt_D_dump_parsed |
Opt_D_dump_parsed_ast |
Opt_D_dump_rn |
Opt_D_dump_rn_ast |
Opt_D_dump_simpl |
Opt_D_dump_simpl_iterations |
Opt_D_dump_spec |
Opt_D_dump_spec_constr |
Opt_D_dump_prep |
Opt_D_dump_late_cc |
Opt_D_dump_stg_from_core | Initial STG (CoreToStg output)
Opt_D_dump_stg_unarised | STG after unarise
Opt_D_dump_stg_cg | STG (after stg2stg)
Opt_D_dump_stg_tags | Result of tag inference analysis.
Opt_D_dump_stg_final | Final STG (before cmm gen)
Opt_D_dump_stg_from_js_sinker | STG after JS sinker
Opt_D_dump_call_arity |
Opt_D_dump_exitify |
Opt_D_dump_dmdanal |
Opt_D_dump_dmd_signatures |
Opt_D_dump_cpranal |
Opt_D_dump_cpr_signatures |
Opt_D_dump_tc |
Opt_D_dump_tc_ast |
Opt_D_dump_hie |
Opt_D_dump_types |
Opt_D_dump_rules |
Opt_D_dump_cse |
Opt_D_dump_float_out |
Opt_D_dump_float_in |
Opt_D_dump_liberate_case |
Opt_D_dump_static_argument_transformation |
Opt_D_dump_worker_wrapper |
Opt_D_dump_rn_trace |
Opt_D_dump_rn_stats |
Opt_D_dump_opt_cmm |
Opt_D_dump_simpl_stats |
Opt_D_dump_cs_trace | Constraint solver in type checker
Opt_D_dump_tc_trace |
Opt_D_dump_ec_trace | Pattern match exhaustiveness checker
Opt_D_dump_if_trace |
Opt_D_dump_splices |
Opt_D_th_dec_file |
Opt_D_dump_BCOs |
Opt_D_dump_ticked |
Opt_D_dump_rtti |
Opt_D_source_stats |
Opt_D_verbose_stg2stg |
Opt_D_dump_hi |
Opt_D_dump_hi_diffs |
Opt_D_dump_mod_cycles |
Opt_D_dump_mod_map |
Opt_D_dump_timings |
Opt_D_dump_view_pattern_commoning |
Opt_D_verbose_core2core |
Opt_D_dump_debug |
Opt_D_dump_json |
Opt_D_ppr_debug |
Opt_D_no_debug_output |
Opt_D_dump_faststrings |
Opt_D_faststring_stats |
Opt_D_ipe_stats |

#### Instances

Instances details

Eq DumpFlag Source # |
Instance details Defined in GHC.Driver.Flags Methods (==) :: DumpFlag -> DumpFlag -> Bool Source # (/=) :: DumpFlag -> DumpFlag -> Bool Source #
Enum DumpFlag Source # |
Instance details Defined in GHC.Driver.Flags Methods succ :: DumpFlag -> DumpFlag Source # pred :: DumpFlag -> DumpFlag Source # toEnum :: Int -> DumpFlag Source # fromEnum :: DumpFlag -> Int Source # enumFrom :: DumpFlag -> [DumpFlag] Source # enumFromThen :: DumpFlag -> DumpFlag -> [DumpFlag] Source # enumFromTo :: DumpFlag -> DumpFlag -> [DumpFlag] Source # enumFromThenTo :: DumpFlag -> DumpFlag -> DumpFlag -> [DumpFlag] Source #
Show DumpFlag Source # |
Instance details Defined in GHC.Driver.Flags Methods showsPrec :: Int -> DumpFlag -> ShowS Source # show :: DumpFlag -> String Source # showList :: [DumpFlag] -> ShowS Source #

getDumpFlagFrom Source #

Arguments

:: (a -> Int) | Getter for verbosity setting
-> (a -> EnumSet DumpFlag) | Getter for the set of enabled dump flags
-> DumpFlag |
-> a |
-> Bool |

Helper function to query whether a given `DumpFlag` is enabled or not.

enabledIfVerbose :: DumpFlag -> Bool Source #

Is the flag implicitly enabled when the verbosity is high enough?

data GeneralFlag Source #

Enumerates the simple on-or-off dynamic flags

Constructors

Opt_DumpToFile | Append dump output to files instead of stdout.
Opt_DumpWithWays | Use foo.ways.dumpFlag instead of foo.dumpFlag
Opt_D_dump_minimal_imports |
Opt_DoCoreLinting |
Opt_DoLinearCoreLinting |
Opt_DoStgLinting |
Opt_DoCmmLinting |
Opt_DoAsmLinting |
Opt_DoAnnotationLinting |
Opt_DoBoundsChecking |
Opt_AddBcoName |
Opt_NoLlvmMangler |
Opt_FastLlvm |
Opt_NoTypeableBinds |
Opt_DistinctConstructorTables |
Opt_InfoTableMap |
Opt_InfoTableMapWithFallback |
Opt_InfoTableMapWithStack |
Opt_WarnIsError | `-Werror`; makes all warnings fatal. See `wopt_set_fatal` for making individual warnings fatal as in `-Werror=foo`.
Opt_ShowWarnGroups | Show the group a warning belongs to.
Opt_HideSourcePaths | `-fhide-source-paths`; hide module source/object paths.
Opt_PrintExplicitForalls |
Opt_PrintExplicitKinds |
Opt_PrintExplicitCoercions |
Opt_PrintExplicitRuntimeReps |
Opt_PrintEqualityRelations |
Opt_PrintAxiomIncomps |
Opt_PrintUnicodeSyntax |
Opt_PrintExpandedSynonyms |
Opt_PrintPotentialInstances |
Opt_PrintRedundantPromotionTicks |
Opt_PrintTypecheckerElaboration |
Opt_CallArity |
Opt_Exitification |
Opt_Strictness |
Opt_LateDmdAnal |
Opt_KillAbsence |
Opt_KillOneShot |
Opt_FullLaziness |
Opt_FloatIn |
Opt_LocalFloatOut | Enable floating out of let-bindings in the simplifier
Opt_LocalFloatOutTopLevel | Enable floating out of let-bindings at the top level in the simplifier N.B. See Note [RHS Floating]
Opt_LateSpecialise |
Opt_Specialise |
Opt_SpecialiseAggressively |
Opt_CrossModuleSpecialise |
Opt_PolymorphicSpecialisation |
Opt_InlineGenerics |
Opt_InlineGenericsAggressively |
Opt_StaticArgumentTransformation |
Opt_CSE |
Opt_StgCSE |
Opt_StgLiftLams |
Opt_LiberateCase |
Opt_SpecConstr |
Opt_SpecConstrKeen |
Opt_SpecialiseIncoherents |
Opt_DoLambdaEtaExpansion |
Opt_DoCleverArgEtaExpansion |
Opt_IgnoreAsserts |
Opt_DoEtaReduction |
Opt_CaseMerge |
Opt_CaseFolding | Constant folding through case-expressions
Opt_UnboxStrictFields |
Opt_UnboxSmallStrictFields |
Opt_DictsCheap |
Opt_EnableRewriteRules | Apply rewrite rules during simplification
Opt_EnableThSpliceWarnings | Enable warnings for TH splices
Opt_RegsGraph | Do graph coloring register allocation
Opt_RegsIterative | Do iterative coalescing graph coloring register allocation
Opt_PedanticBottoms | Be picky about how we treat bottom
Opt_LlvmFillUndefWithGarbage |
Opt_IrrefutableTuples |
Opt_CmmSink |
Opt_CmmStaticPred |
Opt_CmmElimCommonBlocks |
Opt_CmmControlFlow |
Opt_AsmShortcutting |
Opt_InterModuleFarJumps |
Opt_OmitYields |
Opt_FunToThunk |
Opt_DictsStrict | Be strict in argument dictionaries
Opt_DmdTxDictSel | deprecated, no effect and behaviour is now default. Allowed switching of a special demand transformer for dictionary selectors
Opt_Loopification |
Opt_CfgBlocklayout | Use the cfg based block layout algorithm.
Opt_WeightlessBlocklayout | Layout based on last instruction per block.
Opt_CprAnal |
Opt_WorkerWrapper |
Opt_WorkerWrapperUnlift | Do W/W split for unlifting even if we won't unbox anything.
Opt_SolveConstantDicts |
Opt_AlignmentSanitisation |
Opt_CatchNonexhaustiveCases |
Opt_NumConstantFolding | See Note [Constant folding through nested expressions] in GHC.Core.Opt.ConstantFold
Opt_CoreConstantFolding |
Opt_FastPAPCalls |
Opt_SpecEval |
Opt_SpecEvalDictFun |
Opt_DoTagInferenceChecks |
Opt_SimplPreInlining | PreInlining is on by default. The option is there just to see how bad things get if you turn it off!
Opt_IgnoreInterfacePragmas |
Opt_OmitInterfacePragmas |
Opt_ExposeAllUnfoldings |
Opt_ExposeOverloadedUnfoldings |
Opt_KeepAutoRules | Keep auto-generated rules even if they seem to have become useless
Opt_WriteInterface | Forces .hi files to be written even with -fno-code
Opt_WriteSelfRecompInfo |
Opt_WriteSelfRecompFlags | Include detailed flag information for self-recompilation debugging
Opt_WriteHie | Generate .hie files
Opt_DisableJsMinifier | Render JavaScript pretty-printed instead of minified (compacted)
Opt_DisableJsCsources | Don't link C sources (compiled to JS) with Haskell code (compiled to JS)
Opt_AutoSccsOnIndividualCafs |
Opt_ProfCountEntries |
Opt_ProfLateInlineCcs |
Opt_ProfLateCcs |
Opt_ProfLateOverloadedCcs |
Opt_ProfLateoverloadedCallsCCs |
Opt_ProfManualCcs | Ignore manual SCC annotations
Opt_Pp |
Opt_ForceRecomp |
Opt_IgnoreOptimChanges |
Opt_IgnoreHpcChanges |
Opt_ExcessPrecision |
Opt_EagerBlackHoling |
Opt_OrigThunkInfo |
Opt_NoHsMain |
Opt_SplitSections |
Opt_StgStats |
Opt_HideAllPackages |
Opt_HideAllPluginPackages |
Opt_PrintBindResult |
Opt_Haddock |
Opt_HaddockOptions |
Opt_BreakOnException |
Opt_BreakOnError |
Opt_PrintEvldWithShow |
Opt_PrintBindContents |
Opt_GenManifest |
Opt_EmbedManifest |
Opt_SharedImplib |
Opt_BuildingCabalPackage |
Opt_IgnoreDotGhci |
Opt_GhciSandbox |
Opt_InsertBreakpoints |
Opt_GhciHistory |
Opt_GhciLeakCheck |
Opt_ValidateHie |
Opt_LocalGhciHistory |
Opt_NoIt |
Opt_GhciBrowser |
Opt_GhciBrowserRedirectWasiConsole |
Opt_GhciDoLoadTargets | Instruct GHCi to load all targets on startup
Opt_HelpfulErrors |
Opt_DeferTypeErrors |
Opt_DeferTypedHoles |
Opt_DeferOutOfScopeVariables |
Opt_PIC |
    -fPIC
Opt_PIE |
    -fPIE
Opt_PICExecutable |
    -pie
Opt_ExternalDynamicRefs |
Opt_Ticky |
Opt_Ticky_Allocd |
Opt_Ticky_LNE |
Opt_Ticky_Dyn_Thunk |
Opt_Ticky_Tag |
Opt_Ticky_AP | Use regular thunks even when we could use std ap thunks in order to get entry counts
Opt_CmmThreadSanitizer |
Opt_RPath |
Opt_RelativeDynlibPaths |
Opt_CompactUnwind |
    -fcompact-unwind
Opt_Hpc |
Opt_FamAppCache |
Opt_ExternalInterpreter |
Opt_OptimalApplicativeDo |
Opt_VersionMacros |
Opt_WholeArchiveHsLibs |
Opt_SingleLibFolder |
Opt_ExposeInternalSymbols |
Opt_KeepCAFs |
Opt_KeepGoing |
Opt_ByteCode |
Opt_ByteCodeAndObjectCode |
Opt_UnoptimizedCoreForInterpreter |
Opt_LinkRts |
Opt_ErrorSpans | Include full span info in error messages, instead of just the start position.
Opt_DeferDiagnostics |
Opt_DiagnosticsAsJSON | Dump diagnostics as JSON
Opt_DiagnosticsShowCaret | Show snippets of offending code
Opt_PprCaseAsLet |
Opt_PprShowTicks |
Opt_ShowHoleConstraints |
Opt_ShowValidHoleFits |
Opt_SortValidHoleFits |
Opt_SortBySizeHoleFits |
Opt_SortBySubsumHoleFits |
Opt_AbstractRefHoleFits |
Opt_UnclutterValidHoleFits |
Opt_ShowTypeAppOfHoleFits |
Opt_ShowTypeAppVarsOfHoleFits |
Opt_ShowDocsOfHoleFits |
Opt_ShowTypeOfHoleFits |
Opt_ShowProvOfHoleFits |
Opt_ShowMatchesOfHoleFits |
Opt_ShowLoadedModules |
Opt_HexWordLiterals |
Opt_SuppressCoercions | Suppress a coercions inner structure, replacing it with `...`
Opt_SuppressCoercionTypes | Suppress the type of a coercion as well
Opt_SuppressVarKinds |
Opt_SuppressModulePrefixes | Suppress module id prefixes on variables.
Opt_SuppressTypeApplications | Suppress type applications.
Opt_SuppressIdInfo | Suppress info such as arity and unfoldings on identifiers.
Opt_SuppressUnfoldings | Suppress separate type signatures in core, but leave types on lambda bound vars
Opt_SuppressTypeSignatures | Suppress the details of even stable unfoldings
Opt_SuppressUniques | Suppress unique ids on variables. Except for uniques, as some simplifier phases introduce new variables that have otherwise identical names.
Opt_SuppressStgExts |
Opt_SuppressStgReps |
Opt_SuppressTicks | Replaces Opt_PprShowTicks
Opt_SuppressTimestamps | Suppress timestamps in dumps
Opt_SuppressCoreSizes | Suppress per binding Core size stats in dumps
Opt_ShowErrorContext |
Opt_ObjectDeterminism |
Opt_AutoLinkPackages |
Opt_ImplicitImportQualified |
Opt_KeepHscppFiles |
Opt_KeepHiDiffs |
Opt_KeepHcFiles |
Opt_KeepSFiles |
Opt_KeepTmpFiles |
Opt_KeepRawTokenStream |
Opt_KeepLlvmFiles |
Opt_KeepHiFiles |
Opt_KeepOFiles |
Opt_BuildDynamicToo |
Opt_WriteIfSimplifiedCore |
Opt_UseBytecodeRatherThanObjects |
Opt_DistrustAllPackages |
Opt_PackageTrust |
Opt_PluginTrustworthy |
Opt_G_NoStateHack |
Opt_G_NoOptCoercion |

#### Instances

Instances details

Eq GeneralFlag Source # |
Instance details Defined in GHC.Driver.Flags Methods (==) :: GeneralFlag -> GeneralFlag -> Bool Source # (/=) :: GeneralFlag -> GeneralFlag -> Bool Source #
Enum GeneralFlag Source # |
Instance details Defined in GHC.Driver.Flags Methods succ :: GeneralFlag -> GeneralFlag Source # pred :: GeneralFlag -> GeneralFlag Source # toEnum :: Int -> GeneralFlag Source # fromEnum :: GeneralFlag -> Int Source # enumFrom :: GeneralFlag -> [GeneralFlag] Source # enumFromThen :: GeneralFlag -> GeneralFlag -> [GeneralFlag] Source # enumFromTo :: GeneralFlag -> GeneralFlag -> [GeneralFlag] Source # enumFromThenTo :: GeneralFlag -> GeneralFlag -> GeneralFlag -> [GeneralFlag] Source #
Show GeneralFlag Source # |
Instance details Defined in GHC.Driver.Flags Methods showsPrec :: Int -> GeneralFlag -> ShowS Source # show :: GeneralFlag -> String Source # showList :: [GeneralFlag] -> ShowS Source #

data Language Source #

Constructors

Haskell98 |
Haskell2010 |
GHC2021 |
GHC2024 |

#### Instances

Instances details

NFData Language Source # |
Instance details Defined in GHC.Driver.Flags Methods rnf :: Language -> () Source #
Binary Language Source # |
Instance details Defined in GHC.Driver.Flags Methods put_ :: WriteBinHandle -> Language -> IO () Source # put :: WriteBinHandle -> Language -> IO (Bin Language) Source # get :: ReadBinHandle -> IO Language Source #
Outputable Language Source # |
Instance details Defined in GHC.Driver.Flags Methods ppr :: Language -> SDoc Source #
Eq Language Source # |
Instance details Defined in GHC.Driver.Flags Methods (==) :: Language -> Language -> Bool Source # (/=) :: Language -> Language -> Bool Source #
Bounded Language Source # |
Instance details Defined in GHC.Driver.Flags Methods minBound :: Language Source # maxBound :: Language Source #
Enum Language Source # |
Instance details Defined in GHC.Driver.Flags Methods succ :: Language -> Language Source # pred :: Language -> Language Source # toEnum :: Int -> Language Source # fromEnum :: Language -> Int Source # enumFrom :: Language -> [Language] Source # enumFromThen :: Language -> Language -> [Language] Source # enumFromTo :: Language -> Language -> [Language] Source # enumFromThenTo :: Language -> Language -> Language -> [Language] Source #
Show Language Source # |
Instance details Defined in GHC.Driver.Flags Methods showsPrec :: Int -> Language -> ShowS Source # show :: Language -> String Source # showList :: [Language] -> ShowS Source #

defaultLanguage :: Language Source #

The default Language is used if one is not specified explicitly, by both GHC and GHCi.

optimisationFlags :: EnumSet GeneralFlag Source #

The set of flags which affect optimisation for the purposes of recompilation avoidance. Specifically, these include flags which affect code generation but not the semantics of the program.

See Note [Ignoring some flag changes] in GHC.Iface.Recomp.Flags)

codeGenFlags :: EnumSet GeneralFlag Source #

The set of flags which affect code generation and can change a program's runtime behavior (other than performance). These include flags which affect:

- user visible debugging information (e.g. info table provenance)
- the ability to catch runtime errors (e.g. -fignore-asserts)
- the runtime result of the program (e.g. -fomit-yields)
- which code or interface file declarations are emitted

We also considered placing flags which affect asympototic space behavior (e.g. -ffull-laziness) however this would mean that changing optimisation levels would trigger recompilation even with -fignore-optim-changes, regressing #13604.

Also, arguably Opt_IgnoreAsserts should be here as well; however, we place it instead in `optimisationFlags` since it is implied by `-O[12]` and therefore would also break #13604.

See #23369.

# Warnings

data WarningGroup Source #

A group of warning flags that can be enabled or disabled collectively, e.g. using `-Wcompat` to enable all warnings in the `W_compat` group.

Constructors

W_compat |
W_unused_binds |
W_extended_warnings |
W_default |
W_extra |
W_all |
W_everything |

#### Instances

Instances details

Eq WarningGroup Source # |
Instance details Defined in GHC.Driver.Flags Methods (==) :: WarningGroup -> WarningGroup -> Bool Source # (/=) :: WarningGroup -> WarningGroup -> Bool Source #
Bounded WarningGroup Source # |
Instance details Defined in GHC.Driver.Flags Methods minBound :: WarningGroup Source # maxBound :: WarningGroup Source #
Enum WarningGroup Source # |
Instance details Defined in GHC.Driver.Flags Methods succ :: WarningGroup -> WarningGroup Source # pred :: WarningGroup -> WarningGroup Source # toEnum :: Int -> WarningGroup Source # fromEnum :: WarningGroup -> Int Source # enumFrom :: WarningGroup -> [WarningGroup] Source # enumFromThen :: WarningGroup -> WarningGroup -> [WarningGroup] Source # enumFromTo :: WarningGroup -> WarningGroup -> [WarningGroup] Source # enumFromThenTo :: WarningGroup -> WarningGroup -> WarningGroup -> [WarningGroup] Source #

warningGroupName :: WarningGroup -> String Source #

warningGroupFlags :: WarningGroup -> [WarningFlag] Source #

warningGroupIncludesExtendedWarnings :: WarningGroup -> Bool Source #

Does this warning group contain (all) extended warning categories? See Note [Warning categories] in GHC.Unit.Module.Warnings.

The `W_extended_warnings` group contains extended warnings but no `WarningFlag`s, but extended warnings are also treated as part of `W_default` and every warning group that includes it.

data WarningFlag Source #

Constructors

Opt_WarnDuplicateExports |
Opt_WarnDuplicateConstraints |
Opt_WarnRedundantConstraints |
Opt_WarnHiShadows |
Opt_WarnImplicitPrelude |
Opt_WarnIncompletePatterns |
Opt_WarnIncompleteUniPatterns |
Opt_WarnIncompletePatternsRecUpd |
Opt_WarnOverflowedLiterals |
Opt_WarnEmptyEnumerations |
Opt_WarnMissingFields |
Opt_WarnMissingImportList |
Opt_WarnMissingMethods |
Opt_WarnMissingSignatures |
Opt_WarnMissingLocalSignatures |
Opt_WarnNameShadowing |
Opt_WarnOverlappingPatterns |
Opt_WarnTypeDefaults |
Opt_WarnMonomorphism |
Opt_WarnUnusedTopBinds |
Opt_WarnUnusedLocalBinds |
Opt_WarnUnusedPatternBinds |
Opt_WarnUnusedImports |
Opt_WarnUnusedMatches |
Opt_WarnUnusedTypePatterns |
Opt_WarnUnusedForalls |
Opt_WarnUnusedRecordWildcards |
Opt_WarnRedundantBangPatterns |
Opt_WarnRedundantRecordWildcards |
Opt_WarnDeprecatedFlags |
Opt_WarnMissingMonadFailInstances |
Opt_WarnSemigroup |
Opt_WarnDodgyExports |
Opt_WarnDodgyImports |
Opt_WarnOrphans |
Opt_WarnAutoOrphans |
Opt_WarnIdentities |
Opt_WarnTabs |
Opt_WarnUnrecognisedPragmas |
Opt_WarnMisplacedPragmas |
Opt_WarnDodgyForeignImports |
Opt_WarnUnusedDoBind |
Opt_WarnWrongDoBind |
Opt_WarnAlternativeLayoutRuleTransitional |
Opt_WarnUnsafe |
Opt_WarnSafe |
Opt_WarnTrustworthySafe |
Opt_WarnMissedSpecs |
Opt_WarnAllMissedSpecs |
Opt_WarnUnsupportedCallingConventions |
Opt_WarnUnsupportedLlvmVersion |
Opt_WarnMissedExtraSharedLib |
Opt_WarnInlineRuleShadowing |
Opt_WarnTypedHoles |
Opt_WarnPartialTypeSignatures |
Opt_WarnMissingExportedSignatures |
Opt_WarnUntickedPromotedConstructors |
Opt_WarnDerivingTypeable |
Opt_WarnDeferredTypeErrors |
Opt_WarnDeferredOutOfScopeVariables |
Opt_WarnNonCanonicalMonadInstances | Since: ghc-8.0
Opt_WarnNonCanonicalMonadFailInstances | @since 8.0, has no effect since 8.8
Opt_WarnNonCanonicalMonoidInstances | Since: ghc-8.0
Opt_WarnMissingPatternSynonymSignatures | Since: ghc-8.0
Opt_WarnUnrecognisedWarningFlags | Since: ghc-8.0
Opt_WarnSimplifiableClassConstraints | Since: ghc-8.2
Opt_WarnCPPUndef | Since: ghc-8.2
Opt_WarnUnbangedStrictPatterns | Since: ghc-8.2
Opt_WarnMissingHomeModules | Since: ghc-8.2
Opt_WarnPartialFields | Since: ghc-8.4
Opt_WarnMissingExportList |
Opt_WarnInaccessibleCode |
Opt_WarnStarIsType | Since: ghc-8.6
Opt_WarnStarBinder | Since: ghc-8.6
Opt_WarnImplicitKindVars | Since: ghc-8.6
Opt_WarnSpaceAfterBang |
Opt_WarnMissingDerivingStrategies | Since: ghc-8.8
Opt_WarnPrepositiveQualifiedModule | Since: ghc-8.10
Opt_WarnUnusedPackages | Since: ghc-8.10
Opt_WarnInferredSafeImports | Since: ghc-8.10
Opt_WarnMissingSafeHaskellMode | Since: ghc-8.10
Opt_WarnCompatUnqualifiedImports | Since: ghc-8.10
Opt_WarnDerivingDefaults |
Opt_WarnInvalidHaddock | Since: ghc-9.0
Opt_WarnOperatorWhitespaceExtConflict | Since: ghc-9.2
Opt_WarnOperatorWhitespace | Since: ghc-9.2
Opt_WarnAmbiguousFields | Since: ghc-9.2
Opt_WarnImplicitLift | Since: ghc-9.2
Opt_WarnMissingKindSignatures | Since: ghc-9.2
Opt_WarnMissingPolyKindSignatures | Since: ghc-9.8
Opt_WarnMissingExportedPatternSynonymSignatures | Since: ghc-9.2
Opt_WarnRedundantStrictnessFlags | Since: ghc-9.4
Opt_WarnForallIdentifier | Since: ghc-9.4
Opt_WarnUnicodeBidirectionalFormatCharacters | Since: ghc-9.0.2
Opt_WarnGADTMonoLocalBinds | Since: ghc-9.4
Opt_WarnTypeEqualityOutOfScope | Since: ghc-9.4
Opt_WarnTypeEqualityRequiresOperators | Since: ghc-9.4
Opt_WarnLoopySuperclassSolve | @since 9.6, has no effect since 9.10
Opt_WarnTermVariableCapture | Since: ghc-9.8
Opt_WarnMissingRoleAnnotations | Since: ghc-9.8
Opt_WarnImplicitRhsQuantification | Since: ghc-9.8
Opt_WarnIncompleteExportWarnings | Since: ghc-9.8
Opt_WarnIncompleteRecordSelectors | Since: ghc-9.10
Opt_WarnBadlyLevelledTypes | Since: ghc-9.10
Opt_WarnInconsistentFlags | Since: ghc-9.8
Opt_WarnDataKindsTC | Since: ghc-9.10
Opt_WarnDefaultedExceptionContext | Since: ghc-9.10
Opt_WarnViewPatternSignatures | Since: ghc-9.12
Opt_WarnUselessSpecialisations | Since: ghc-9.14
Opt_WarnDeprecatedPragmas | Since: ghc-9.14
Opt_WarnRuleLhsEqualities | @since 9.14, scheduled to be removed in 9.18 See Note [Quantifying over equalities in RULES] in GHC.Tc.Gen.Sig
Opt_WarnUnusableUnpackPragmas |
Opt_WarnPatternNamespaceSpecifier |

#### Instances

Instances details

Eq WarningFlag Source # |
Instance details Defined in GHC.Driver.Flags Methods (==) :: WarningFlag -> WarningFlag -> Bool Source # (/=) :: WarningFlag -> WarningFlag -> Bool Source #
Ord WarningFlag Source # |
Instance details Defined in GHC.Driver.Flags Methods compare :: WarningFlag -> WarningFlag -> Ordering Source # (<) :: WarningFlag -> WarningFlag -> Bool Source # (<=) :: WarningFlag -> WarningFlag -> Bool Source # (>) :: WarningFlag -> WarningFlag -> Bool Source # (>=) :: WarningFlag -> WarningFlag -> Bool Source # max :: WarningFlag -> WarningFlag -> WarningFlag Source # min :: WarningFlag -> WarningFlag -> WarningFlag Source #
Bounded WarningFlag Source # |
Instance details Defined in GHC.Driver.Flags Methods minBound :: WarningFlag Source # maxBound :: WarningFlag Source #
Enum WarningFlag Source # |
Instance details Defined in GHC.Driver.Flags Methods succ :: WarningFlag -> WarningFlag Source # pred :: WarningFlag -> WarningFlag Source # toEnum :: Int -> WarningFlag Source # fromEnum :: WarningFlag -> Int Source # enumFrom :: WarningFlag -> [WarningFlag] Source # enumFromThen :: WarningFlag -> WarningFlag -> [WarningFlag] Source # enumFromTo :: WarningFlag -> WarningFlag -> [WarningFlag] Source # enumFromThenTo :: WarningFlag -> WarningFlag -> WarningFlag -> [WarningFlag] Source #
Show WarningFlag Source # |
Instance details Defined in GHC.Driver.Flags Methods showsPrec :: Int -> WarningFlag -> ShowS Source # show :: WarningFlag -> String Source # showList :: [WarningFlag] -> ShowS Source #

warnFlagNames :: WarningFlag -> NonEmpty String Source #

Return the names of a WarningFlag

One flag may have several names because of US/UK spelling. The first one is the "preferred one" that will be displayed in warning messages.

warningGroups :: [WarningGroup] Source #

Warning groups.

As all warnings are in the `W_everything` set, it is ignored when displaying to the user which group a warning is in.

warningHierarchies :: [[WarningGroup]] Source #

Warning group hierarchies, where there is an explicit inclusion relation.

Each inner list is a hierarchy of warning groups, ordered from smallest to largest, where each group is a superset of the one before it.

Separating this from `warningGroups` allows for multiple hierarchies with no inherent relation to be defined.

The special-case `W_everything` group is not included.

smallestWarningGroups :: WarningFlag -> [WarningGroup] Source #

Find the smallest group in every hierarchy which a warning belongs to, excluding Weverything.

smallestWarningGroupsForCategory :: [WarningGroup] Source #

The smallest group in every hierarchy to which a custom warning category belongs is currently always `-Wextended-warnings`. See Note [Warning categories] in GHC.Unit.Module.Warnings.

standardWarnings :: [WarningFlag] Source #

Warnings enabled unless specified otherwise

minusWOpts :: [WarningFlag] Source #

Things you get with `-W`.

minusWallOpts :: [WarningFlag] Source #

Things you get with `-Wall`.

minusWeverythingOpts :: [WarningFlag] Source #

Things you get with `-Weverything`, i.e. *all* known warnings flags.

minusWcompatOpts :: [WarningFlag] Source #

Things you get with `-Wcompat`.

This is intended to group together warnings that will be enabled by default at some point in the future, so that library authors eager to make their code future compatible to fix issues before they even generate warnings.

unusedBindsFlags :: [WarningFlag] Source #

Things you get with `-Wunused-binds`.

data OnOff a Source #

Constructors

On a |
Off a |

#### Instances

Instances details

Outputable a => Outputable (OnOff a) Source # |
Instance details Defined in GHC.Driver.Flags Methods ppr :: OnOff a -> SDoc Source #
Eq a => Eq (OnOff a) Source # |
Instance details Defined in GHC.Driver.Flags Methods (==) :: OnOff a -> OnOff a -> Bool Source # (/=) :: OnOff a -> OnOff a -> Bool Source #
Show a => Show (OnOff a) Source # |
Instance details Defined in GHC.Driver.Flags Methods showsPrec :: Int -> OnOff a -> ShowS Source # show :: OnOff a -> String Source # showList :: [OnOff a] -> ShowS Source #

type TurnOnFlag = Bool Source #

turnOn :: TurnOnFlag Source #

turnOff :: TurnOnFlag Source #

impliedXFlags :: [(Extension, OnOff Extension)] Source #

validHoleFitsImpliedGFlags :: [(GeneralFlag, TurnOnFlag, GeneralFlag)] Source #

impliedGFlags :: [(GeneralFlag, TurnOnFlag, GeneralFlag)] Source #

General flags that are switched on/off when other general flags are switched on

impliedOffGFlags :: [(GeneralFlag, TurnOnFlag, GeneralFlag)] Source #

General flags that are switched on/off when other general flags are switched off

glasgowExtsFlags :: [Extension] Source #

data ExtensionDeprecation Source #

Constructors

ExtensionNotDeprecated |
ExtensionDeprecatedFor [Extension] |
ExtensionFlagDeprecatedCond TurnOnFlag String |
ExtensionFlagDeprecated String |

#### Instances

Instances details

Eq ExtensionDeprecation Source # |
Instance details Defined in GHC.Driver.Flags Methods (==) :: ExtensionDeprecation -> ExtensionDeprecation -> Bool Source # (/=) :: ExtensionDeprecation -> ExtensionDeprecation -> Bool Source #

data Deprecation Source #

Constructors

NotDeprecated |
Deprecated |

#### Instances

Instances details

Eq Deprecation Source # |
Instance details Defined in GHC.Driver.Flags Methods (==) :: Deprecation -> Deprecation -> Bool Source # (/=) :: Deprecation -> Deprecation -> Bool Source #
Ord Deprecation Source # |
Instance details Defined in GHC.Driver.Flags Methods compare :: Deprecation -> Deprecation -> Ordering Source # (<) :: Deprecation -> Deprecation -> Bool Source # (<=) :: Deprecation -> Deprecation -> Bool Source # (>) :: Deprecation -> Deprecation -> Bool Source # (>=) :: Deprecation -> Deprecation -> Bool Source # max :: Deprecation -> Deprecation -> Deprecation Source # min :: Deprecation -> Deprecation -> Deprecation Source #

extensionDeprecation :: Extension -> ExtensionDeprecation Source #

deprecation :: ExtensionDeprecation -> Deprecation Source #

Always returns `Deprecated` even when the flag is only conditionally deprecated.

extensionNames :: Extension -> [(ExtensionDeprecation, String)] Source #

All the names by which an extension is known.

extensionName :: Extension -> String Source #