ghc-lib-parser-9.10.1.20250103: The GHC API, decoupled from GHC versions

Safe Haskell | Ignore
Language | GHC2021

GHC.Driver.DynFlags

Contents

- Dynamic flags and associated configuration types
  - Manipulating DynFlags
  - System tool settings and locations
- Linker/compiler information
- Include specifications
- SDoc
- Platform features

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_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
- 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_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_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_DoTagInferenceChecks
  - | Opt_SimplPreInlining
  - | Opt_IgnoreInterfacePragmas
  - | Opt_OmitInterfacePragmas
  - | Opt_ExposeAllUnfoldings
  - | Opt_KeepAutoRules
  - | Opt_WriteInterface
  - | 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_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_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 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_WarnBadlyStagedTypes
  - | Opt_WarnInconsistentFlags
  - | Opt_WarnDataKindsTC
  - | Opt_WarnDeprecatedTypeAbstractions
  - | Opt_WarnDefaultedExceptionContext
- data DiagnosticReason where
  - WarningWithoutFlag
  - WarningWithFlags !(NonEmpty WarningFlag)
  - WarningWithCategory !WarningCategory
  - ErrorWithoutFlag
  - pattern WarningWithFlag :: WarningFlag -> DiagnosticReason
- data Language
  - = Haskell98
  - | Haskell2010
  - | GHC2021
  - | GHC2024
- type FatalMessager = String -> IO ()
- newtype FlushOut = FlushOut (IO ())
- data ProfAuto
  - = NoProfAuto
  - | ProfAutoAll
  - | ProfAutoTop
  - | ProfAutoExports
  - | ProfAutoCalls
- hasPprDebug :: DynFlags -> Bool
- hasNoDebugOutput :: DynFlags -> Bool
- hasNoStateHack :: DynFlags -> Bool
- hasNoOptCoercion :: DynFlags -> Bool
- dopt :: DumpFlag -> DynFlags -> Bool
- dopt_set :: DynFlags -> DumpFlag -> DynFlags
- dopt_unset :: DynFlags -> DumpFlag -> DynFlags
- gopt :: GeneralFlag -> DynFlags -> Bool
- gopt_set :: DynFlags -> GeneralFlag -> DynFlags
- gopt_unset :: DynFlags -> GeneralFlag -> DynFlags
- wopt :: WarningFlag -> DynFlags -> Bool
- wopt_set :: DynFlags -> WarningFlag -> DynFlags
- wopt_unset :: DynFlags -> WarningFlag -> DynFlags
- wopt_fatal :: WarningFlag -> DynFlags -> Bool
- wopt_set_fatal :: DynFlags -> WarningFlag -> DynFlags
- wopt_unset_fatal :: DynFlags -> WarningFlag -> DynFlags
- wopt_set_all_custom :: DynFlags -> DynFlags
- wopt_unset_all_custom :: DynFlags -> DynFlags
- wopt_set_all_fatal_custom :: DynFlags -> DynFlags
- wopt_unset_all_fatal_custom :: DynFlags -> DynFlags
- wopt_set_custom :: DynFlags -> WarningCategory -> DynFlags
- wopt_unset_custom :: DynFlags -> WarningCategory -> DynFlags
- wopt_set_fatal_custom :: DynFlags -> WarningCategory -> DynFlags
- wopt_unset_fatal_custom :: DynFlags -> WarningCategory -> DynFlags
- wopt_any_custom :: DynFlags -> Bool
- xopt :: Extension -> DynFlags -> Bool
- xopt_set :: DynFlags -> Extension -> DynFlags
- xopt_unset :: DynFlags -> Extension -> DynFlags
- xopt_set_unlessExplSpec :: Extension -> (DynFlags -> Extension -> DynFlags) -> DynFlags -> DynFlags
- xopt_DuplicateRecordFields :: DynFlags -> DuplicateRecordFields
- xopt_FieldSelectors :: DynFlags -> FieldSelectors
- lang_set :: DynFlags -> Maybe Language -> DynFlags
- data DynamicTooState
  - = DT_Dont
  - | DT_OK
  - | DT_Dyn
- dynamicTooState :: DynFlags -> DynamicTooState
- setDynamicNow :: DynFlags -> DynFlags
- data OnOff a
  - = On a
  - | Off a
- data DynFlags = DynFlags {
  - ghcMode :: GhcMode
  - ghcLink :: GhcLink
  - backend :: !Backend
  - ghcNameVersion :: !GhcNameVersion
  - fileSettings :: !FileSettings
  - targetPlatform :: Platform
  - toolSettings :: !ToolSettings
  - platformMisc :: !PlatformMisc
  - rawSettings :: [(String, String)]
  - tmpDir :: TempDir
  - llvmOptLevel :: Int
  - verbosity :: Int
  - debugLevel :: Int
  - simplPhases :: Int
  - maxSimplIterations :: Int
  - ruleCheck :: Maybe String
  - strictnessBefore :: [Int]
  - parMakeCount :: Maybe ParMakeCount
  - enableTimeStats :: Bool
  - ghcHeapSize :: Maybe Int
  - maxRelevantBinds :: Maybe Int
  - maxValidHoleFits :: Maybe Int
  - maxRefHoleFits :: Maybe Int
  - refLevelHoleFits :: Maybe Int
  - maxUncoveredPatterns :: Int
  - maxPmCheckModels :: Int
  - simplTickFactor :: Int
  - dmdUnboxWidth :: !Int
  - specConstrThreshold :: Maybe Int
  - specConstrCount :: Maybe Int
  - specConstrRecursive :: Int
  - binBlobThreshold :: Maybe Word
  - liberateCaseThreshold :: Maybe Int
  - floatLamArgs :: Maybe Int
  - liftLamsRecArgs :: Maybe Int
  - liftLamsNonRecArgs :: Maybe Int
  - liftLamsKnown :: Bool
  - cmmProcAlignment :: Maybe Int
  - historySize :: Int
  - importPaths :: [FilePath]
  - mainModuleNameIs :: ModuleName
  - mainFunIs :: Maybe String
  - reductionDepth :: IntWithInf
  - solverIterations :: IntWithInf
  - givensFuel :: Int
  - wantedsFuel :: Int
  - qcsFuel :: Int
  - homeUnitId_ :: UnitId
  - homeUnitInstanceOf_ :: Maybe UnitId
  - homeUnitInstantiations_ :: [(ModuleName, Module)]
  - workingDirectory :: Maybe FilePath
  - thisPackageName :: Maybe String
  - hiddenModules :: Set ModuleName
  - reexportedModules :: Set ModuleName
  - targetWays_ :: Ways
  - splitInfo :: Maybe (String, Int)
  - objectDir :: Maybe String
  - dylibInstallName :: Maybe String
  - hiDir :: Maybe String
  - hieDir :: Maybe String
  - stubDir :: Maybe String
  - dumpDir :: Maybe String
  - objectSuf_ :: String
  - hcSuf :: String
  - hiSuf_ :: String
  - hieSuf :: String
  - dynObjectSuf_ :: String
  - dynHiSuf_ :: String
  - outputFile_ :: Maybe String
  - dynOutputFile_ :: Maybe String
  - outputHi :: Maybe String
  - dynOutputHi :: Maybe String
  - dynLibLoader :: DynLibLoader
  - dynamicNow :: !Bool
  - dumpPrefix :: FilePath
  - dumpPrefixForce :: Maybe FilePath
  - ldInputs :: [Option]
  - includePaths :: IncludeSpecs
  - libraryPaths :: [String]
  - frameworkPaths :: [String]
  - cmdlineFrameworks :: [String]
  - rtsOpts :: Maybe String
  - rtsOptsEnabled :: RtsOptsEnabled
  - rtsOptsSuggestions :: Bool
  - hpcDir :: String
  - pluginModNames :: [ModuleName]
  - pluginModNameOpts :: [(ModuleName, String)]
  - frontendPluginOpts :: [String]
  - externalPluginSpecs :: [ExternalPluginSpec]
  - depMakefile :: FilePath
  - depIncludePkgDeps :: Bool
  - depIncludeCppDeps :: Bool
  - depExcludeMods :: [ModuleName]
  - depSuffixes :: [String]
  - packageDBFlags :: [PackageDBFlag]
  - ignorePackageFlags :: [IgnorePackageFlag]
  - packageFlags :: [PackageFlag]
  - pluginPackageFlags :: [PackageFlag]
  - trustFlags :: [TrustFlag]
  - packageEnv :: Maybe FilePath
  - dumpFlags :: EnumSet DumpFlag
  - generalFlags :: EnumSet GeneralFlag
  - warningFlags :: EnumSet WarningFlag
  - fatalWarningFlags :: EnumSet WarningFlag
  - customWarningCategories :: WarningCategorySet
  - fatalCustomWarningCategories :: WarningCategorySet
  - language :: Maybe Language
  - safeHaskell :: SafeHaskellMode
  - safeInfer :: Bool
  - safeInferred :: Bool
  - thOnLoc :: SrcSpan
  - newDerivOnLoc :: SrcSpan
  - deriveViaOnLoc :: SrcSpan
  - overlapInstLoc :: SrcSpan
  - incoherentOnLoc :: SrcSpan
  - pkgTrustOnLoc :: SrcSpan
  - warnSafeOnLoc :: SrcSpan
  - warnUnsafeOnLoc :: SrcSpan
  - trustworthyOnLoc :: SrcSpan
  - extensions :: [OnOff Extension]
  - extensionFlags :: EnumSet Extension
  - unfoldingOpts :: !UnfoldingOpts
  - maxWorkerArgs :: Int
  - ghciHistSize :: Int
  - flushOut :: FlushOut
  - ghcVersionFile :: Maybe FilePath
  - haddockOptions :: Maybe String
  - ghciScripts :: [String]
  - pprUserLength :: Int
  - pprCols :: Int
  - useUnicode :: Bool
  - useColor :: OverridingBool
  - canUseColor :: Bool
  - useErrorLinks :: OverridingBool
  - canUseErrorLinks :: Bool
  - colScheme :: Scheme
  - profAuto :: ProfAuto
  - callerCcFilters :: [CallerCcFilter]
  - interactivePrint :: Maybe String
  - sseVersion :: Maybe SseVersion
  - bmiVersion :: Maybe BmiVersion
  - avx :: Bool
  - avx2 :: Bool
  - avx512cd :: Bool
  - avx512er :: Bool
  - avx512f :: Bool
  - avx512pf :: Bool
  - fma :: Bool
  - maxInlineAllocSize :: Int
  - maxInlineMemcpyInsns :: Int
  - maxInlineMemsetInsns :: Int
  - reverseErrors :: Bool
  - maxErrors :: Maybe Int
  - initialUnique :: Word64
  - uniqueIncrement :: Int
  - cfgWeights :: Weights
  }
- data ParMakeCount
  - = ParMakeThisMany Int
  - | ParMakeNumProcessors
  - | ParMakeSemaphore FilePath
- ways :: DynFlags -> Ways
- class HasDynFlags (m :: Type -> Type) where
  - getDynFlags :: m DynFlags
- class ContainsDynFlags t where
  - extractDynFlags :: t -> DynFlags
- data RtsOptsEnabled
  - = RtsOptsNone
  - | RtsOptsIgnore
  - | RtsOptsIgnoreAll
  - | RtsOptsSafeOnly
  - | RtsOptsAll
- data GhcMode
  - = CompManager
  - | OneShot
  - | MkDepend
- isOneShot :: GhcMode -> Bool
- data GhcLink
  - = NoLink
  - | LinkBinary
  - | LinkInMemory
  - | LinkDynLib
  - | LinkStaticLib
  - | LinkMergedObj
- isNoLink :: GhcLink -> Bool
- data PackageFlag
  - = ExposePackage String PackageArg ModRenaming
  - | HidePackage String
- data PackageArg
  - = PackageArg String
  - | UnitIdArg Unit
- data ModRenaming = ModRenaming {
  - modRenamingWithImplicit :: Bool
  - modRenamings :: [(ModuleName, ModuleName)]
  }
- packageFlagsChanged :: DynFlags -> DynFlags -> Bool
- newtype IgnorePackageFlag = IgnorePackage String
- data TrustFlag
  - = TrustPackage String
  - | DistrustPackage String
- data PackageDBFlag
  - = PackageDB PkgDbRef
  - | NoUserPackageDB
  - | NoGlobalPackageDB
  - | ClearPackageDBs
- data PkgDbRef
  - = GlobalPkgDb
  - | UserPkgDb
  - | PkgDbPath FilePath
- data Option
  - = FileOption String String
  - | Option String
- showOpt :: Option -> String
- data DynLibLoader
  - = Deployable
  - | SystemDependent
- positionIndependent :: DynFlags -> Bool
- optimisationFlags :: EnumSet GeneralFlag
- targetProfile :: DynFlags -> Profile
- defaultDynFlags :: Settings -> DynFlags
- initDynFlags :: DynFlags -> IO DynFlags
- defaultFatalMessager :: FatalMessager
- defaultFlushOut :: FlushOut
- optLevelFlags :: [([Int], GeneralFlag)]
- languageExtensions :: Maybe Language -> [Extension]
- type TurnOnFlag = Bool
- turnOn :: TurnOnFlag
- turnOff :: TurnOnFlag
- programName :: DynFlags -> String
- projectVersion :: DynFlags -> String
- ghcUsagePath :: DynFlags -> FilePath
- ghciUsagePath :: DynFlags -> FilePath
- topDir :: DynFlags -> FilePath
- toolDir :: DynFlags -> Maybe FilePath
- versionedAppDir :: String -> ArchOS -> MaybeT IO FilePath
- versionedFilePath :: ArchOS -> FilePath
- extraGccViaCFlags :: DynFlags -> [String]
- globalPackageDatabasePath :: DynFlags -> FilePath
- data LinkerInfo
  - = GnuLD [Option]
  - | Mold [Option]
  - | GnuGold [Option]
  - | LlvmLLD [Option]
  - | DarwinLD [Option]
  - | SolarisLD [Option]
  - | AixLD [Option]
  - | UnknownLD
- data CompilerInfo
  - = GCC
  - | Clang
  - | AppleClang
  - | AppleClang51
  - | Emscripten
  - | UnknownCC
- data IncludeSpecs = IncludeSpecs {
  - includePathsQuote :: [String]
  - includePathsGlobal :: [String]
  - includePathsQuoteImplicit :: [String]
  }
- addGlobalInclude :: IncludeSpecs -> [String] -> IncludeSpecs
- addQuoteInclude :: IncludeSpecs -> [String] -> IncludeSpecs
- flattenIncludes :: IncludeSpecs -> [String]
- addImplicitQuoteInclude :: IncludeSpecs -> [String] -> IncludeSpecs
- initSDocContext :: DynFlags -> PprStyle -> SDocContext
- initDefaultSDocContext :: DynFlags -> SDocContext
- initPromotionTickContext :: DynFlags -> PromotionTickContext
- isSse4_2Enabled :: DynFlags -> Bool
- isAvxEnabled :: DynFlags -> Bool
- isAvx2Enabled :: DynFlags -> Bool
- isAvx512cdEnabled :: DynFlags -> Bool
- isAvx512erEnabled :: DynFlags -> Bool
- isAvx512fEnabled :: DynFlags -> Bool
- isAvx512pfEnabled :: DynFlags -> Bool
- isFmaEnabled :: DynFlags -> Bool
- isBmiEnabled :: DynFlags -> Bool
- isBmi2Enabled :: DynFlags -> Bool

# Dynamic flags and associated configuration types

data DumpFlag #

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 |
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_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 |

#### Instances

Instances details

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

data GeneralFlag #

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_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 | 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 |
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_OmitYields |
Opt_FunToThunk |
Opt_DictsStrict |
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 |
Opt_CoreConstantFolding |
Opt_FastPAPCalls |
Opt_DoTagInferenceChecks |
Opt_SimplPreInlining |
Opt_IgnoreInterfacePragmas |
Opt_OmitInterfacePragmas |
Opt_ExposeAllUnfoldings |
Opt_KeepAutoRules | Keep auto-generated rules even if they seem to have become useless
Opt_WriteInterface |
Opt_WriteHie |
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_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 |
Opt_DeferDiagnostics |
Opt_DiagnosticsAsJSON | Dump diagnostics as JSON
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 | Suppress timestamps in dumps
Opt_SuppressCoreSizes | Suppress per binding Core size stats in dumps
Opt_ShowErrorContext |
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

Enum GeneralFlag # |

Instance details

Defined in GHC.Driver.Flags

Methods

succ :: GeneralFlag -> GeneralFlag #

pred :: GeneralFlag -> GeneralFlag #

toEnum :: Int -> GeneralFlag #

fromEnum :: GeneralFlag -> Int #

enumFrom :: GeneralFlag -> [GeneralFlag] #

enumFromThen :: GeneralFlag -> GeneralFlag -> [GeneralFlag] #

enumFromTo :: GeneralFlag -> GeneralFlag -> [GeneralFlag] #

enumFromThenTo :: GeneralFlag -> GeneralFlag -> GeneralFlag -> [GeneralFlag] #

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

data WarningFlag #

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 |
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_WarnBadlyStagedTypes |
Opt_WarnInconsistentFlags |
Opt_WarnDataKindsTC |
Opt_WarnDeprecatedTypeAbstractions |
Opt_WarnDefaultedExceptionContext |

#### Instances

Instances details

Bounded WarningFlag # |
Instance details Defined in GHC.Driver.Flags Methods minBound :: WarningFlag # maxBound :: WarningFlag #
Enum WarningFlag # |

Instance details

Defined in GHC.Driver.Flags

Methods

succ :: WarningFlag -> WarningFlag #

pred :: WarningFlag -> WarningFlag #

toEnum :: Int -> WarningFlag #

fromEnum :: WarningFlag -> Int #

enumFrom :: WarningFlag -> [WarningFlag] #

enumFromThen :: WarningFlag -> WarningFlag -> [WarningFlag] #

enumFromTo :: WarningFlag -> WarningFlag -> [WarningFlag] #

enumFromThenTo :: WarningFlag -> WarningFlag -> WarningFlag -> [WarningFlag] #

Show WarningFlag # |
Instance details Defined in GHC.Driver.Flags Methods showsPrec :: Int -> WarningFlag -> ShowS # show :: WarningFlag -> String # showList :: [WarningFlag] -> ShowS #
Eq WarningFlag # |
Instance details Defined in GHC.Driver.Flags Methods (==) :: WarningFlag -> WarningFlag -> Bool # (/=) :: WarningFlag -> WarningFlag -> Bool #
Ord WarningFlag # |
Instance details Defined in GHC.Driver.Flags Methods compare :: WarningFlag -> WarningFlag -> Ordering # (<) :: WarningFlag -> WarningFlag -> Bool # (<=) :: WarningFlag -> WarningFlag -> Bool # (>) :: WarningFlag -> WarningFlag -> Bool # (>=) :: WarningFlag -> WarningFlag -> Bool # max :: WarningFlag -> WarningFlag -> WarningFlag # min :: WarningFlag -> WarningFlag -> WarningFlag #

data DiagnosticReason #

The reason why a `Diagnostic` was emitted in the first place. Diagnostic messages are born within GHC with a very precise reason, which can be completely statically-computed (i.e. this is an error or a warning no matter what), or influenced by the specific state of the `DynFlags` at the moment of the creation of a new `Diagnostic`. For example, a parsing error is always going to be an error, whereas a 'WarningWithoutFlag Opt_WarnUnusedImports' might turn into an error due to '-Werror' or '-Werror=warn-unused-imports'. Interpreting a `DiagnosticReason` together with its associated `Severity` gives us the full picture.

Constructors

WarningWithoutFlag | Born as a warning.
WarningWithFlags !(NonEmpty WarningFlag) | Warning was enabled with the flag.
WarningWithCategory !WarningCategory | Warning was enabled with a custom category.
ErrorWithoutFlag | Born as an error.

Bundled Patterns

pattern WarningWithFlag :: WarningFlag -> DiagnosticReason | The single warning case `DiagnosticReason` is very common.

#### Instances

Instances details

Show DiagnosticReason # |
Instance details Defined in GHC.Types.Error Methods showsPrec :: Int -> DiagnosticReason -> ShowS # show :: DiagnosticReason -> String # showList :: [DiagnosticReason] -> ShowS #
Outputable DiagnosticReason # |
Instance details Defined in GHC.Types.Error Methods ppr :: DiagnosticReason -> SDoc #
Eq DiagnosticReason # |
Instance details Defined in GHC.Types.Error Methods (==) :: DiagnosticReason -> DiagnosticReason -> Bool # (/=) :: DiagnosticReason -> DiagnosticReason -> Bool #

data Language #

Constructors

Haskell98 |
Haskell2010 |
GHC2021 |
GHC2024 |

#### Instances

Instances details

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

type FatalMessager = String -> IO () #

newtype FlushOut #

Constructors

FlushOut (IO ()) |

data ProfAuto #

What kind of {-# SCC #-} to add automatically

Constructors

NoProfAuto | no SCC annotations added
ProfAutoAll | top-level and nested functions are annotated
ProfAutoTop | top-level functions annotated only
ProfAutoExports | exported functions annotated only
ProfAutoCalls | annotate call-sites

#### Instances

Instances details

Enum ProfAuto # |
Instance details Defined in GHC.Types.ProfAuto Methods succ :: ProfAuto -> ProfAuto # pred :: ProfAuto -> ProfAuto # toEnum :: Int -> ProfAuto # fromEnum :: ProfAuto -> Int # enumFrom :: ProfAuto -> [ProfAuto] # enumFromThen :: ProfAuto -> ProfAuto -> [ProfAuto] # enumFromTo :: ProfAuto -> ProfAuto -> [ProfAuto] # enumFromThenTo :: ProfAuto -> ProfAuto -> ProfAuto -> [ProfAuto] #
Eq ProfAuto # |
Instance details Defined in GHC.Types.ProfAuto Methods (==) :: ProfAuto -> ProfAuto -> Bool # (/=) :: ProfAuto -> ProfAuto -> Bool #

hasPprDebug :: DynFlags -> Bool #

hasNoDebugOutput :: DynFlags -> Bool #

hasNoStateHack :: DynFlags -> Bool #

hasNoOptCoercion :: DynFlags -> Bool #

dopt :: DumpFlag -> DynFlags -> Bool #

Test whether a `DumpFlag` is set

dopt_set :: DynFlags -> DumpFlag -> DynFlags #

Set a `DumpFlag`

dopt_unset :: DynFlags -> DumpFlag -> DynFlags #

Unset a `DumpFlag`

gopt :: GeneralFlag -> DynFlags -> Bool #

Test whether a `GeneralFlag` is set

Note that `dynamicNow` (i.e., dynamic objects built with `-dynamic-too`) always implicitly enables Opt_PIC, Opt_ExternalDynamicRefs, and disables Opt_SplitSections.

gopt_set :: DynFlags -> GeneralFlag -> DynFlags #

Set a `GeneralFlag`

gopt_unset :: DynFlags -> GeneralFlag -> DynFlags #

Unset a `GeneralFlag`

wopt :: WarningFlag -> DynFlags -> Bool #

Test whether a `WarningFlag` is set

wopt_set :: DynFlags -> WarningFlag -> DynFlags #

Set a `WarningFlag`

wopt_unset :: DynFlags -> WarningFlag -> DynFlags #

Unset a `WarningFlag`

wopt_fatal :: WarningFlag -> DynFlags -> Bool #

Test whether a `WarningFlag` is set as fatal

wopt_set_fatal :: DynFlags -> WarningFlag -> DynFlags #

Mark a `WarningFlag` as fatal (do not set the flag)

wopt_unset_fatal :: DynFlags -> WarningFlag -> DynFlags #

Mark a `WarningFlag` as not fatal

wopt_set_all_custom :: DynFlags -> DynFlags #

Enable all custom warning categories.

wopt_unset_all_custom :: DynFlags -> DynFlags #

Disable all custom warning categories.

wopt_set_all_fatal_custom :: DynFlags -> DynFlags #

Mark all custom warning categories as fatal (do not set the flags).

wopt_unset_all_fatal_custom :: DynFlags -> DynFlags #

Mark all custom warning categories as non-fatal.

wopt_set_custom :: DynFlags -> WarningCategory -> DynFlags #

Set a custom `WarningCategory`

wopt_unset_custom :: DynFlags -> WarningCategory -> DynFlags #

Unset a custom `WarningCategory`

wopt_set_fatal_custom :: DynFlags -> WarningCategory -> DynFlags #

Mark a custom `WarningCategory` as fatal (do not set the flag)

wopt_unset_fatal_custom :: DynFlags -> WarningCategory -> DynFlags #

Mark a custom `WarningCategory` as not fatal

wopt_any_custom :: DynFlags -> Bool #

Are there any custom warning categories enabled?

xopt :: Extension -> DynFlags -> Bool #

Test whether a `Extension` is set

xopt_set :: DynFlags -> Extension -> DynFlags #

Set a `Extension`

xopt_unset :: DynFlags -> Extension -> DynFlags #

Unset a `Extension`

xopt_set_unlessExplSpec :: Extension -> (DynFlags -> Extension -> DynFlags) -> DynFlags -> DynFlags #

Set or unset a `Extension`, unless it has been explicitly set or unset before.

xopt_DuplicateRecordFields :: DynFlags -> DuplicateRecordFields #

xopt_FieldSelectors :: DynFlags -> FieldSelectors #

lang_set :: DynFlags -> Maybe Language -> DynFlags #

data DynamicTooState #

Constructors

DT_Dont | Don't try to build dynamic objects too
DT_OK | Will still try to generate dynamic objects
DT_Dyn | Currently generating dynamic objects (in the backend)

#### Instances

Instances details

Show DynamicTooState # |
Instance details Defined in GHC.Driver.DynFlags Methods showsPrec :: Int -> DynamicTooState -> ShowS # show :: DynamicTooState -> String # showList :: [DynamicTooState] -> ShowS #
Eq DynamicTooState # |
Instance details Defined in GHC.Driver.DynFlags Methods (==) :: DynamicTooState -> DynamicTooState -> Bool # (/=) :: DynamicTooState -> DynamicTooState -> Bool #
Ord DynamicTooState # |

Instance details

Defined in GHC.Driver.DynFlags

Methods

compare :: DynamicTooState -> DynamicTooState -> Ordering #

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

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

(>) :: DynamicTooState -> DynamicTooState -> Bool #

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

max :: DynamicTooState -> DynamicTooState -> DynamicTooState #

min :: DynamicTooState -> DynamicTooState -> DynamicTooState #

dynamicTooState :: DynFlags -> DynamicTooState #

setDynamicNow :: DynFlags -> DynFlags #

data OnOff a #

Constructors

On a |
Off a |

#### Instances

Instances details

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

data DynFlags #

Contains not only a collection of `GeneralFlag`s but also a plethora of information relating to the compilation of a single file or GHC session

Constructors

DynFlags |

Fields

- ghcMode :: GhcMode
- ghcLink :: GhcLink
- backend :: !Backend

  The backend to use (if any).

  Whenever you change the backend, also make sure to set `ghcLink` to something sensible.

  `NoBackend` can be used to avoid generating any output, however, note that:

  - If a program uses Template Haskell the typechecker may need to run code from an imported module. To facilitate this, code generation is enabled for modules imported by modules that use template haskell, using the default backend for the platform. See Note [-fno-code mode].
- ghcNameVersion :: !GhcNameVersion
- fileSettings :: !FileSettings
- targetPlatform :: Platform
- toolSettings :: !ToolSettings
- platformMisc :: !PlatformMisc
- rawSettings :: [(String, String)]
- tmpDir :: TempDir
- llvmOptLevel :: Int

  LLVM optimisation level

- verbosity :: Int

  Verbosity level: see Note [Verbosity levels]

- debugLevel :: Int

  How much debug information to produce

- simplPhases :: Int

  Number of simplifier phases

- maxSimplIterations :: Int

  Max simplifier iterations

- ruleCheck :: Maybe String
- strictnessBefore :: [Int]

  Additional demand analysis

- parMakeCount :: Maybe ParMakeCount

  The number of modules to compile in parallel If unspecified, compile with a single job.

- enableTimeStats :: Bool

  Enable RTS timing statistics?

- ghcHeapSize :: Maybe Int

  The heap size to set.

- maxRelevantBinds :: Maybe Int

  Maximum number of bindings from the type envt to show in type error messages

- maxValidHoleFits :: Maybe Int

  Maximum number of hole fits to show in typed hole error messages

- maxRefHoleFits :: Maybe Int

  Maximum number of refinement hole fits to show in typed hole error messages

- refLevelHoleFits :: Maybe Int

  Maximum level of refinement for refinement hole fits in typed hole error messages

- maxUncoveredPatterns :: Int

  Maximum number of unmatched patterns to show in non-exhaustiveness warnings

- maxPmCheckModels :: Int

  Soft limit on the number of models the pattern match checker checks a pattern against. A safe guard against exponential blow-up.

- simplTickFactor :: Int

  Multiplier for simplifier ticks

- dmdUnboxWidth :: !Int

  Whether DmdAnal should optimistically put an Unboxed demand on returned products with at most this number of fields

- specConstrThreshold :: Maybe Int

  Threshold for SpecConstr

- specConstrCount :: Maybe Int

  Max number of specialisations for any one function

- specConstrRecursive :: Int

  Max number of specialisations for recursive types Not optional; otherwise ForceSpecConstr can diverge.

- binBlobThreshold :: Maybe Word

  Binary literals (e.g. strings) whose size is above this threshold will be dumped in a binary file by the assembler code generator. 0 and Nothing disables this feature. See `Config`.

- liberateCaseThreshold :: Maybe Int

  Threshold for LiberateCase

- floatLamArgs :: Maybe Int

  Arg count for lambda floating See `FloatOutSwitches`

- liftLamsRecArgs :: Maybe Int

  Maximum number of arguments after lambda lifting a recursive function.

- liftLamsNonRecArgs :: Maybe Int

  Maximum number of arguments after lambda lifting a non-recursive function.

- liftLamsKnown :: Bool

  Lambda lift even when this turns a known call into an unknown call.

- cmmProcAlignment :: Maybe Int

  Align Cmm functions at this boundary or use default.

- historySize :: Int

  Simplification history size

- importPaths :: [FilePath]
- mainModuleNameIs :: ModuleName
- mainFunIs :: Maybe String
- reductionDepth :: IntWithInf

  Typechecker maximum stack depth

- solverIterations :: IntWithInf

  Number of iterations in the constraints solver Typically only 1 is needed

- givensFuel :: Int

  Number of layers of superclass expansion for givens Should be < solverIterations See Note [Expanding Recursive Superclasses and ExpansionFuel]

- wantedsFuel :: Int

  Number of layers of superclass expansion for wanteds Should be < givensFuel See Note [Expanding Recursive Superclasses and ExpansionFuel]

- qcsFuel :: Int

  Number of layers of superclass expansion for quantified constraints Should be < givensFuel See Note [Expanding Recursive Superclasses and ExpansionFuel]

- homeUnitId_ :: UnitId

  Target home unit-id

- homeUnitInstanceOf_ :: Maybe UnitId

  Id of the unit to instantiate

- homeUnitInstantiations_ :: [(ModuleName, Module)]

  Module instantiations

- workingDirectory :: Maybe FilePath
- thisPackageName :: Maybe String

  What the package is called, use with multiple home units

- hiddenModules :: Set ModuleName
- reexportedModules :: Set ModuleName
- targetWays_ :: Ways

  Target way flags from the command line

- splitInfo :: Maybe (String, Int)
- objectDir :: Maybe String
- dylibInstallName :: Maybe String
- hiDir :: Maybe String
- hieDir :: Maybe String
- stubDir :: Maybe String
- dumpDir :: Maybe String
- objectSuf_ :: String
- hcSuf :: String
- hiSuf_ :: String
- hieSuf :: String
- dynObjectSuf_ :: String
- dynHiSuf_ :: String
- outputFile_ :: Maybe String
- dynOutputFile_ :: Maybe String
- outputHi :: Maybe String
- dynOutputHi :: Maybe String
- dynLibLoader :: DynLibLoader
- dynamicNow :: !Bool

  Indicate if we are now generating dynamic output because of -dynamic-too. This predicate is used to query the appropriate fields (outputFile/dynOutputFile, ways, etc.)

- dumpPrefix :: FilePath

  This defaults to 'non-module'. It can be set by `setDumpPrefix` or 'ghc.GHCi.UI.runStmt' based on where its output is going.

- dumpPrefixForce :: Maybe FilePath

  Override the `dumpPrefix` set by `setDumpPrefix` or 'ghc.GHCi.UI.runStmt'. Set by `-ddump-file-prefix`

- ldInputs :: [Option]
- includePaths :: IncludeSpecs
- libraryPaths :: [String]
- frameworkPaths :: [String]
- cmdlineFrameworks :: [String]
- rtsOpts :: Maybe String
- rtsOptsEnabled :: RtsOptsEnabled
- rtsOptsSuggestions :: Bool
- hpcDir :: String

  Path to store the .mix files

- pluginModNames :: [ModuleName]

  the `-fplugin` flags given on the command line, in *reverse* order that they're specified on the command line.

- pluginModNameOpts :: [(ModuleName, String)]
- frontendPluginOpts :: [String]

  the `-ffrontend-opt` flags given on the command line, in *reverse* order that they're specified on the command line.

- externalPluginSpecs :: [ExternalPluginSpec]

  External plugins loaded from shared libraries

- depMakefile :: FilePath
- depIncludePkgDeps :: Bool
- depIncludeCppDeps :: Bool
- depExcludeMods :: [ModuleName]
- depSuffixes :: [String]
- packageDBFlags :: [PackageDBFlag]

  The `-package-db` flags given on the command line, In *reverse* order that they're specified on the command line. This is intended to be applied with the list of "initial" package databases derived from `GHC_PACKAGE_PATH`; see `getUnitDbRefs`.

- ignorePackageFlags :: [IgnorePackageFlag]

  The `-ignore-package` flags from the command line. In *reverse* order that they're specified on the command line.

- packageFlags :: [PackageFlag]

  The `-package` and `-hide-package` flags from the command-line. In *reverse* order that they're specified on the command line.

- pluginPackageFlags :: [PackageFlag]

  The `-plugin-package-id` flags from command line. In *reverse* order that they're specified on the command line.

- trustFlags :: [TrustFlag]

  The `-trust` and `-distrust` flags. In *reverse* order that they're specified on the command line.

- packageEnv :: Maybe FilePath

  Filepath to the package environment file (if overriding default)

- dumpFlags :: EnumSet DumpFlag
- generalFlags :: EnumSet GeneralFlag
- warningFlags :: EnumSet WarningFlag
- fatalWarningFlags :: EnumSet WarningFlag
- customWarningCategories :: WarningCategorySet
- fatalCustomWarningCategories :: WarningCategorySet
- language :: Maybe Language
- safeHaskell :: SafeHaskellMode

  Safe Haskell mode

- safeInfer :: Bool
- safeInferred :: Bool
- thOnLoc :: SrcSpan
- newDerivOnLoc :: SrcSpan
- deriveViaOnLoc :: SrcSpan
- overlapInstLoc :: SrcSpan
- incoherentOnLoc :: SrcSpan
- pkgTrustOnLoc :: SrcSpan
- warnSafeOnLoc :: SrcSpan
- warnUnsafeOnLoc :: SrcSpan
- trustworthyOnLoc :: SrcSpan
- extensions :: [OnOff Extension]
- extensionFlags :: EnumSet Extension
- unfoldingOpts :: !UnfoldingOpts

  Unfolding control See Note [Discounts and thresholds] in GHC.Core.Unfold

- maxWorkerArgs :: Int
- ghciHistSize :: Int
- flushOut :: FlushOut
- ghcVersionFile :: Maybe FilePath
- haddockOptions :: Maybe String
- ghciScripts :: [String]

  GHCi scripts specified by -ghci-script, in reverse order

- pprUserLength :: Int
- pprCols :: Int
- useUnicode :: Bool
- useColor :: OverridingBool
- canUseColor :: Bool
- useErrorLinks :: OverridingBool
- canUseErrorLinks :: Bool
- colScheme :: Scheme
- profAuto :: ProfAuto

  what kind of {-# SCC #-} to add automatically

- callerCcFilters :: [CallerCcFilter]
- interactivePrint :: Maybe String
- sseVersion :: Maybe SseVersion

  Machine dependent flags (-m<blah> stuff)

- bmiVersion :: Maybe BmiVersion
- avx :: Bool
- avx2 :: Bool
- avx512cd :: Bool
- avx512er :: Bool
- avx512f :: Bool
- avx512pf :: Bool
- fma :: Bool

  Enable FMA instructions.

- maxInlineAllocSize :: Int

  Max size, in bytes, of inline array allocations.

- maxInlineMemcpyInsns :: Int

  Only inline memcpy if it generates no more than this many pseudo (roughly: Cmm) instructions.

- maxInlineMemsetInsns :: Int

  Only inline memset if it generates no more than this many pseudo (roughly: Cmm) instructions.

- reverseErrors :: Bool

  Reverse the order of error messages in GHC/GHCi

- maxErrors :: Maybe Int

  Limit the maximum number of errors to show

- initialUnique :: Word64

  Unique supply configuration for testing build determinism

- uniqueIncrement :: Int
- cfgWeights :: Weights

  Temporary: CFG Edge weights for fast iterations

data ParMakeCount #

The type for the -jN argument, specifying that -j on its own represents using the number of machine processors.

Constructors

ParMakeThisMany Int | Use this many processors (`-jn` flag).
ParMakeNumProcessors | Use parallelism with as many processors as possible (`-j` flag without an argument).
ParMakeSemaphore FilePath | Use the specific semaphore `sem` to control parallelism (`-jsem sem` flag).

ways :: DynFlags -> Ways #

class HasDynFlags (m :: Type -> Type) where #

Methods

getDynFlags :: m DynFlags #

#### Instances

Instances details

HasDynFlags CoreM # |
Instance details Defined in GHC.Core.Opt.Monad Methods getDynFlags :: CoreM DynFlags #
HasDynFlags Hsc # |
Instance details Defined in GHC.Driver.Env.Types Methods getDynFlags :: Hsc DynFlags #
HasDynFlags Ghc # |
Instance details Defined in GHC.Driver.Monad Methods getDynFlags :: Ghc DynFlags #
ContainsDynFlags env => HasDynFlags (IOEnv env) # |
Instance details Defined in GHC.Data.IOEnv Methods getDynFlags :: IOEnv env DynFlags #
MonadIO m => HasDynFlags (GhcT m) # |
Instance details Defined in GHC.Driver.Monad Methods getDynFlags :: GhcT m DynFlags #
(Monad m, HasDynFlags m) => HasDynFlags (MaybeT m) # |
Instance details Defined in GHC.Driver.DynFlags Methods getDynFlags :: MaybeT m DynFlags #
(Monad m, HasDynFlags m) => HasDynFlags (ExceptT e m) # |
Instance details Defined in GHC.Driver.DynFlags Methods getDynFlags :: ExceptT e m DynFlags #
(Monad m, HasDynFlags m) => HasDynFlags (ReaderT a m) # |
Instance details Defined in GHC.Driver.DynFlags Methods getDynFlags :: ReaderT a m DynFlags #
(Monoid a, Monad m, HasDynFlags m) => HasDynFlags (WriterT a m) # |
Instance details Defined in GHC.Driver.DynFlags Methods getDynFlags :: WriterT a m DynFlags #

class ContainsDynFlags t where #

Methods

extractDynFlags :: t -> DynFlags #

#### Instances

Instances details

ContainsDynFlags HscEnv # |
Instance details Defined in GHC.Driver.Env.Types Methods extractDynFlags :: HscEnv -> DynFlags #
ContainsDynFlags (Env gbl lcl) # |
Instance details Defined in GHC.Tc.Types Methods extractDynFlags :: Env gbl lcl -> DynFlags #

data RtsOptsEnabled #

Constructors

RtsOptsNone |
RtsOptsIgnore |
RtsOptsIgnoreAll |
RtsOptsSafeOnly |
RtsOptsAll |

#### Instances

Instances details

Show RtsOptsEnabled # |
Instance details Defined in GHC.Driver.DynFlags Methods showsPrec :: Int -> RtsOptsEnabled -> ShowS # show :: RtsOptsEnabled -> String # showList :: [RtsOptsEnabled] -> ShowS #

data GhcMode #

The `GhcMode` tells us whether we're doing multi-module compilation (controlled via the GHC API) or one-shot (single-module) compilation. This makes a difference primarily to the GHC.Unit.Finder: in one-shot mode we look for interface files for imported modules, but in multi-module mode we look for source files in order to check whether they need to be recompiled.

Constructors

CompManager | `--make`, GHCi, etc.

OneShot

    ghc -c Foo.hs

MkDepend | `ghc -M`, see GHC.Unit.Finder for why we need this

#### Instances

Instances details

Outputable GhcMode # |
Instance details Defined in GHC.Driver.DynFlags Methods ppr :: GhcMode -> SDoc #
Eq GhcMode # |
Instance details Defined in GHC.Driver.DynFlags Methods (==) :: GhcMode -> GhcMode -> Bool # (/=) :: GhcMode -> GhcMode -> Bool #

isOneShot :: GhcMode -> Bool #

data GhcLink #

What to do in the link step, if there is one.

Constructors

NoLink | Don't link at all
LinkBinary | Link object code into a binary
LinkInMemory | Use the in-memory dynamic linker (works for both bytecode and object code).
LinkDynLib | Link objects into a dynamic lib (DLL on Windows, DSO on ELF platforms)
LinkStaticLib | Link objects into a static lib
LinkMergedObj | Link objects into a merged "GHCi object"

#### Instances

Instances details

Show GhcLink # |
Instance details Defined in GHC.Driver.DynFlags Methods showsPrec :: Int -> GhcLink -> ShowS # show :: GhcLink -> String # showList :: [GhcLink] -> ShowS #
Eq GhcLink # |
Instance details Defined in GHC.Driver.DynFlags Methods (==) :: GhcLink -> GhcLink -> Bool # (/=) :: GhcLink -> GhcLink -> Bool #

isNoLink :: GhcLink -> Bool #

data PackageFlag #

Flags for manipulating packages visibility.

Constructors

ExposePackage String PackageArg ModRenaming | `-package`, `-package-id`

HidePackage String

    -hide-package

#### Instances

Instances details

Outputable PackageFlag # |
Instance details Defined in GHC.Driver.DynFlags Methods ppr :: PackageFlag -> SDoc #
Eq PackageFlag # |
Instance details Defined in GHC.Driver.DynFlags Methods (==) :: PackageFlag -> PackageFlag -> Bool # (/=) :: PackageFlag -> PackageFlag -> Bool #

data PackageArg #

We accept flags which make packages visible, but how they select the package varies; this data type reflects what selection criterion is used.

Constructors

PackageArg String | `-package`, by `PackageName`
UnitIdArg Unit | `-package-id`, by `Unit`

#### Instances

Instances details

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

data ModRenaming #

Represents the renaming that may be associated with an exposed package, e.g. the `rns` part of `-package "foo (rns)"`.

Here are some example parsings of the package flags (where a string literal is punned to be a `ModuleName`:

- `-package foo` is `ModRenaming True []`
- `-package foo ()` is `ModRenaming False []`
- `-package foo (A)` is `ModRenaming False [(A, A)]`
- `-package foo (A as B)` is `ModRenaming False [(A, B)]`
- `-package foo with (A as B)` is `ModRenaming True [(A, B)]`

Constructors

ModRenaming |

Fields

- modRenamingWithImplicit :: Bool

  Bring all exposed modules into scope?

- modRenamings :: [(ModuleName, ModuleName)]

  Bring module `m` into scope under name `n`.

#### Instances

Instances details

Outputable ModRenaming # |
Instance details Defined in GHC.Driver.DynFlags Methods ppr :: ModRenaming -> SDoc #
Eq ModRenaming # |
Instance details Defined in GHC.Driver.DynFlags Methods (==) :: ModRenaming -> ModRenaming -> Bool # (/=) :: ModRenaming -> ModRenaming -> Bool #

packageFlagsChanged :: DynFlags -> DynFlags -> Bool #

newtype IgnorePackageFlag #

Flags for manipulating the set of non-broken packages.

Constructors

IgnorePackage String

    -ignore-package

#### Instances

Instances details

Eq IgnorePackageFlag # |
Instance details Defined in GHC.Driver.DynFlags Methods (==) :: IgnorePackageFlag -> IgnorePackageFlag -> Bool # (/=) :: IgnorePackageFlag -> IgnorePackageFlag -> Bool #

data TrustFlag #

Flags for manipulating package trust.

Constructors

TrustPackage String

    -trust

DistrustPackage String

    -distrust

#### Instances

Instances details

Eq TrustFlag # |
Instance details Defined in GHC.Driver.DynFlags Methods (==) :: TrustFlag -> TrustFlag -> Bool # (/=) :: TrustFlag -> TrustFlag -> Bool #

data PackageDBFlag #

Constructors

PackageDB PkgDbRef |
NoUserPackageDB |
NoGlobalPackageDB |
ClearPackageDBs |

#### Instances

Instances details

Eq PackageDBFlag # |
Instance details Defined in GHC.Driver.DynFlags Methods (==) :: PackageDBFlag -> PackageDBFlag -> Bool # (/=) :: PackageDBFlag -> PackageDBFlag -> Bool #

data PkgDbRef #

Constructors

GlobalPkgDb |
UserPkgDb |
PkgDbPath FilePath |

#### Instances

Instances details

Eq PkgDbRef # |
Instance details Defined in GHC.Driver.DynFlags Methods (==) :: PkgDbRef -> PkgDbRef -> Bool # (/=) :: PkgDbRef -> PkgDbRef -> Bool #

data Option #

When invoking external tools as part of the compilation pipeline, we pass these a sequence of options on the command-line. Rather than just using a list of Strings, we use a type that allows us to distinguish between filepaths and 'other stuff'. The reason for this is that this type gives us a handle on transforming filenames, and filenames only, to whatever format they're expected to be on a particular platform.

Constructors

FileOption String String |
Option String |

#### Instances

Instances details

Eq Option # |
Instance details Defined in GHC.Utils.CliOption Methods (==) :: Option -> Option -> Bool # (/=) :: Option -> Option -> Bool #

showOpt :: Option -> String #

data DynLibLoader #

Constructors

Deployable |
SystemDependent |

#### Instances

Instances details

Eq DynLibLoader # |
Instance details Defined in GHC.Driver.DynFlags Methods (==) :: DynLibLoader -> DynLibLoader -> Bool # (/=) :: DynLibLoader -> DynLibLoader -> Bool #

positionIndependent :: DynFlags -> Bool #

Are we building with `-fPIE` or `-fPIC` enabled?

optimisationFlags :: EnumSet GeneralFlag #

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)

targetProfile :: DynFlags -> Profile #

Get target profile

## Manipulating DynFlags

defaultDynFlags :: Settings -> DynFlags #

The normal `DynFlags`. Note that they are not suitable for use in this form and must be fully initialized by `runGhc` first.

initDynFlags :: DynFlags -> IO DynFlags #

Used by `runGhc` to partially initialize a new `DynFlags` value

defaultFatalMessager :: FatalMessager #

defaultFlushOut :: FlushOut #

optLevelFlags :: [([Int], GeneralFlag)] #

languageExtensions :: Maybe Language -> [Extension] #

The language extensions implied by the various language variants. When updating this be sure to update the flag documentation in `docsusers_guideexts`.

type TurnOnFlag = Bool #

turnOn :: TurnOnFlag #

turnOff :: TurnOnFlag #

## System tool settings and locations

programName :: DynFlags -> String #

projectVersion :: DynFlags -> String #

ghcUsagePath :: DynFlags -> FilePath #

ghciUsagePath :: DynFlags -> FilePath #

topDir :: DynFlags -> FilePath #

toolDir :: DynFlags -> Maybe FilePath #

versionedAppDir :: String -> ArchOS -> MaybeT IO FilePath #

The directory for this version of ghc in the user's app directory The appdir used to be in ~/.ghc but to respect the XDG specification we want to move it under $XDG_DATA_HOME/ However, old tooling (like cabal) might still write package environments to the old directory, so we prefer that if a subdirectory of ~/.ghc with the correct target and GHC version suffix exists.

i.e. if ~.ghc$UNIQUE_SUBDIR exists we use that otherwise we use $XDG_DATA_HOME/$UNIQUE_SUBDIR

UNIQUE_SUBDIR is typically a combination of the target platform and GHC version

versionedFilePath :: ArchOS -> FilePath #

extraGccViaCFlags :: DynFlags -> [String] #

globalPackageDatabasePath :: DynFlags -> FilePath #

# Linker/compiler information

data LinkerInfo #

Constructors

GnuLD [Option] |
Mold [Option] |
GnuGold [Option] |
LlvmLLD [Option] |
DarwinLD [Option] |
SolarisLD [Option] |
AixLD [Option] |
UnknownLD |

#### Instances

Instances details

Eq LinkerInfo # |
Instance details Defined in GHC.Driver.DynFlags Methods (==) :: LinkerInfo -> LinkerInfo -> Bool # (/=) :: LinkerInfo -> LinkerInfo -> Bool #

data CompilerInfo #

Constructors

GCC |
Clang |
AppleClang |
AppleClang51 |
Emscripten |
UnknownCC |

#### Instances

Instances details

Eq CompilerInfo # |
Instance details Defined in GHC.Driver.DynFlags Methods (==) :: CompilerInfo -> CompilerInfo -> Bool # (/=) :: CompilerInfo -> CompilerInfo -> Bool #

# Include specifications

data IncludeSpecs #

Used to differentiate the scope an include needs to apply to. We have to split the include paths to avoid accidentally forcing recursive includes since -I overrides the system search paths. See #14312.

Constructors

IncludeSpecs |

Fields

- includePathsQuote :: [String]
- includePathsGlobal :: [String]
- includePathsQuoteImplicit :: [String]

  See Note [Implicit include paths]

#### Instances

Instances details

Show IncludeSpecs # |
Instance details Defined in GHC.Driver.DynFlags Methods showsPrec :: Int -> IncludeSpecs -> ShowS # show :: IncludeSpecs -> String # showList :: [IncludeSpecs] -> ShowS #

addGlobalInclude :: IncludeSpecs -> [String] -> IncludeSpecs #

Append to the list of includes a path that shall be included using `-I` when the C compiler is called. These paths override system search paths.

addQuoteInclude :: IncludeSpecs -> [String] -> IncludeSpecs #

Append to the list of includes a path that shall be included using `-iquote` when the C compiler is called. These paths only apply when quoted includes are used. e.g. #include "foo.h"

flattenIncludes :: IncludeSpecs -> [String] #

Concatenate and flatten the list of global and quoted includes returning just a flat list of paths.

addImplicitQuoteInclude :: IncludeSpecs -> [String] -> IncludeSpecs #

These includes are not considered while fingerprinting the flags for iface | See Note [Implicit include paths]

# SDoc

initSDocContext :: DynFlags -> PprStyle -> SDocContext #

Initialize the pretty-printing options

initDefaultSDocContext :: DynFlags -> SDocContext #

Initialize the pretty-printing options using the default user style

initPromotionTickContext :: DynFlags -> PromotionTickContext #

# Platform features

isSse4_2Enabled :: DynFlags -> Bool #

isAvxEnabled :: DynFlags -> Bool #

isAvx2Enabled :: DynFlags -> Bool #

isAvx512cdEnabled :: DynFlags -> Bool #

isAvx512erEnabled :: DynFlags -> Bool #

isAvx512fEnabled :: DynFlags -> Bool #

isAvx512pfEnabled :: DynFlags -> Bool #

isFmaEnabled :: DynFlags -> Bool #

isBmiEnabled :: DynFlags -> Bool #

isBmi2Enabled :: DynFlags -> Bool #