HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Moduleghc-9.10.3GHC2021

GHC.Driver.Flags

  • 5 types
  • 19 values
  • Packageghc-9.10.3
  • Exports24
  • LanguageGHC2021
  • LicenceBSD-3-Clause
  • SourceFlags.hs
datadata DumpFlag
#

Debugging flags

Constructors

Instances3Enum, Eq, Show
datadata GeneralFlag
#

Enumerates the simple on-or-off dynamic flags

Constructors

Instances3Enum, Eq, Show
datadata Language
#
Instances7Bounded, Enum, Eq, Show, NFData, Outputable, …

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

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)

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

16 declarations
datadata WarningFlag
#
Opt_WarnDuplicateExportsOpt_WarnDuplicateConstraintsOpt_WarnRedundantConstraintsOpt_WarnHiShadowsOpt_WarnImplicitPreludeOpt_WarnIncompletePatternsOpt_WarnIncompleteUniPatternsOpt_WarnIncompletePatternsRecUpdOpt_WarnOverflowedLiteralsOpt_WarnEmptyEnumerationsOpt_WarnMissingFieldsOpt_WarnMissingImportListOpt_WarnMissingMethodsOpt_WarnMissingSignaturesOpt_WarnMissingLocalSignaturesOpt_WarnNameShadowingOpt_WarnOverlappingPatternsOpt_WarnTypeDefaultsOpt_WarnMonomorphismOpt_WarnUnusedTopBindsOpt_WarnUnusedLocalBindsOpt_WarnUnusedPatternBindsOpt_WarnUnusedImportsOpt_WarnUnusedMatchesOpt_WarnUnusedTypePatternsOpt_WarnUnusedForallsOpt_WarnUnusedRecordWildcardsOpt_WarnRedundantBangPatternsOpt_WarnRedundantRecordWildcardsOpt_WarnDeprecatedFlagsOpt_WarnMissingMonadFailInstancesOpt_WarnSemigroupOpt_WarnDodgyExportsOpt_WarnDodgyImportsOpt_WarnOrphansOpt_WarnAutoOrphansOpt_WarnIdentitiesOpt_WarnTabsOpt_WarnUnrecognisedPragmasOpt_WarnMisplacedPragmasOpt_WarnDodgyForeignImportsOpt_WarnUnusedDoBindOpt_WarnWrongDoBindOpt_WarnAlternativeLayoutRuleTransitionalOpt_WarnUnsafeOpt_WarnSafeOpt_WarnTrustworthySafeOpt_WarnMissedSpecsOpt_WarnAllMissedSpecsOpt_WarnUnsupportedCallingConventionsOpt_WarnUnsupportedLlvmVersionOpt_WarnMissedExtraSharedLibOpt_WarnInlineRuleShadowingOpt_WarnTypedHolesOpt_WarnPartialTypeSignaturesOpt_WarnMissingExportedSignaturesOpt_WarnUntickedPromotedConstructorsOpt_WarnDerivingTypeableOpt_WarnDeferredTypeErrorsOpt_WarnDeferredOutOfScopeVariablesOpt_WarnNonCanonicalMonadInstancesOpt_WarnNonCanonicalMonadFailInstancesOpt_WarnNonCanonicalMonoidInstancesOpt_WarnMissingPatternSynonymSignaturesOpt_WarnUnrecognisedWarningFlagsOpt_WarnSimplifiableClassConstraintsOpt_WarnCPPUndefOpt_WarnUnbangedStrictPatternsOpt_WarnMissingHomeModulesOpt_WarnPartialFieldsOpt_WarnMissingExportListOpt_WarnInaccessibleCodeOpt_WarnStarIsTypeOpt_WarnStarBinderOpt_WarnImplicitKindVarsOpt_WarnSpaceAfterBangOpt_WarnMissingDerivingStrategiesOpt_WarnPrepositiveQualifiedModuleOpt_WarnUnusedPackagesOpt_WarnInferredSafeImportsOpt_WarnMissingSafeHaskellModeOpt_WarnCompatUnqualifiedImportsOpt_WarnDerivingDefaultsOpt_WarnInvalidHaddockOpt_WarnOperatorWhitespaceExtConflictOpt_WarnOperatorWhitespaceOpt_WarnAmbiguousFieldsOpt_WarnImplicitLiftOpt_WarnMissingKindSignaturesOpt_WarnMissingPolyKindSignaturesOpt_WarnMissingExportedPatternSynonymSignaturesOpt_WarnRedundantStrictnessFlagsOpt_WarnForallIdentifierOpt_WarnUnicodeBidirectionalFormatCharactersOpt_WarnGADTMonoLocalBindsOpt_WarnTypeEqualityOutOfScopeOpt_WarnTypeEqualityRequiresOperatorsOpt_WarnLoopySuperclassSolveOpt_WarnTermVariableCaptureOpt_WarnMissingRoleAnnotationsOpt_WarnImplicitRhsQuantificationOpt_WarnIncompleteExportWarningsOpt_WarnIncompleteRecordSelectorsOpt_WarnBadlyStagedTypesOpt_WarnInconsistentFlagsOpt_WarnDataKindsTCOpt_WarnDeprecatedTypeAbstractionsOpt_WarnDefaultedExceptionContext
Instances5Bounded, Enum, Eq, Ord, Show

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.

Warning groups.

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

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 Weverything group is not included.

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.