ghc-8.2.2: The GHC API

Safe Haskell | None
Language | Haskell2010

DynFlags

Contents

- Dynamic flags and associated configuration types
  - Log output
  - Safe Haskell
  - System tool settings and locations
  - Manipulating DynFlags
  - Parsing DynFlags
  - Available DynFlags
  - DynFlags C compiler options
- Compiler configuration suitable for display to the user
- SSE and AVX
- Linker/compiler information

Description

Dynamic flags

Most flags are dynamic flags, which means they can change from compilation to compilation using `OPTIONS_GHC` pragmas, and in a multi-session GHC each session can be using different dynamic flags. Dynamic flags can also be set at the prompt in GHCi.

(c) The University of Glasgow 2005

Synopsis

- data DumpFlag
  - = Opt_D_dump_cmm
  - | Opt_D_dump_cmm_from_stg
  - | Opt_D_dump_cmm_raw
  - | 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_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_asm_expanded
  - | Opt_D_dump_llvm
  - | Opt_D_dump_core_stats
  - | Opt_D_dump_deriv
  - | Opt_D_dump_ds
  - | Opt_D_dump_foreign
  - | Opt_D_dump_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_shape
  - | Opt_D_dump_simpl
  - | Opt_D_dump_simpl_iterations
  - | Opt_D_dump_spec
  - | Opt_D_dump_prep
  - | Opt_D_dump_stg
  - | Opt_D_dump_call_arity
  - | Opt_D_dump_stranal
  - | Opt_D_dump_str_signatures
  - | Opt_D_dump_tc
  - | Opt_D_dump_tc_ast
  - | Opt_D_dump_types
  - | Opt_D_dump_rules
  - | Opt_D_dump_cse
  - | 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_vt_trace
  - | Opt_D_dump_splices
  - | Opt_D_th_dec_file
  - | Opt_D_dump_BCOs
  - | Opt_D_dump_vect
  - | 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_view_pattern_commoning
  - | Opt_D_verbose_core2core
  - | Opt_D_dump_debug
  - | Opt_D_dump_json
  - | Opt_D_ppr_debug
  - | Opt_D_no_debug_output
- data GeneralFlag
  - = Opt_DumpToFile
  - | Opt_D_faststring_stats
  - | Opt_D_dump_minimal_imports
  - | Opt_DoCoreLinting
  - | Opt_DoStgLinting
  - | Opt_DoCmmLinting
  - | Opt_DoAsmLinting
  - | Opt_DoAnnotationLinting
  - | Opt_NoLlvmMangler
  - | Opt_WarnIsError
  - | Opt_ShowWarnGroups
  - | Opt_HideSourcePaths
  - | Opt_PrintExplicitForalls
  - | Opt_PrintExplicitKinds
  - | Opt_PrintExplicitCoercions
  - | Opt_PrintExplicitRuntimeReps
  - | Opt_PrintEqualityRelations
  - | Opt_PrintUnicodeSyntax
  - | Opt_PrintExpandedSynonyms
  - | Opt_PrintPotentialInstances
  - | Opt_PrintTypecheckerElaboration
  - | Opt_CallArity
  - | Opt_Strictness
  - | Opt_LateDmdAnal
  - | Opt_KillAbsence
  - | Opt_KillOneShot
  - | Opt_FullLaziness
  - | Opt_FloatIn
  - | Opt_Specialise
  - | Opt_SpecialiseAggressively
  - | Opt_CrossModuleSpecialise
  - | Opt_StaticArgumentTransformation
  - | Opt_CSE
  - | Opt_StgCSE
  - | Opt_LiberateCase
  - | Opt_SpecConstr
  - | Opt_SpecConstrKeen
  - | Opt_DoLambdaEtaExpansion
  - | Opt_IgnoreAsserts
  - | Opt_DoEtaReduction
  - | Opt_CaseMerge
  - | Opt_CaseFolding
  - | Opt_UnboxStrictFields
  - | Opt_UnboxSmallStrictFields
  - | Opt_DictsCheap
  - | Opt_EnableRewriteRules
  - | Opt_Vectorise
  - | Opt_VectorisationAvoidance
  - | Opt_RegsGraph
  - | Opt_RegsIterative
  - | Opt_PedanticBottoms
  - | Opt_LlvmTBAA
  - | Opt_LlvmPassVectorsInRegisters
  - | Opt_LlvmFillUndefWithGarbage
  - | Opt_IrrefutableTuples
  - | Opt_CmmSink
  - | Opt_CmmElimCommonBlocks
  - | Opt_OmitYields
  - | Opt_FunToThunk
  - | Opt_DictsStrict
  - | Opt_DmdTxDictSel
  - | Opt_Loopification
  - | Opt_CprAnal
  - | Opt_WorkerWrapper
  - | Opt_SolveConstantDicts
  - | Opt_IgnoreInterfacePragmas
  - | Opt_OmitInterfacePragmas
  - | Opt_ExposeAllUnfoldings
  - | Opt_WriteInterface
  - | Opt_AutoSccsOnIndividualCafs
  - | Opt_ProfCountEntries
  - | Opt_Pp
  - | Opt_ForceRecomp
  - | Opt_ExcessPrecision
  - | Opt_EagerBlackHoling
  - | Opt_NoHsMain
  - | Opt_SplitObjs
  - | 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_GhciHistory
  - | Opt_LocalGhciHistory
  - | Opt_HelpfulErrors
  - | Opt_DeferTypeErrors
  - | Opt_DeferTypedHoles
  - | Opt_DeferOutOfScopeVariables
  - | Opt_PIC
  - | Opt_PIE
  - | Opt_PICExecutable
  - | Opt_SccProfilingOn
  - | Opt_Ticky
  - | Opt_Ticky_Allocd
  - | Opt_Ticky_LNE
  - | Opt_Ticky_Dyn_Thunk
  - | Opt_RPath
  - | Opt_RelativeDynlibPaths
  - | Opt_Hpc
  - | Opt_FlatCache
  - | Opt_ExternalInterpreter
  - | Opt_OptimalApplicativeDo
  - | Opt_VersionMacros
  - | Opt_WholeArchiveHsLibs
  - | Opt_SimplPreInlining
  - | Opt_ErrorSpans
  - | Opt_DiagnosticsShowCaret
  - | Opt_PprCaseAsLet
  - | Opt_PprShowTicks
  - | Opt_ShowHoleConstraints
  - | Opt_ShowLoadedModules
  - | Opt_SuppressCoercions
  - | Opt_SuppressVarKinds
  - | Opt_SuppressModulePrefixes
  - | Opt_SuppressTypeApplications
  - | Opt_SuppressIdInfo
  - | Opt_SuppressUnfoldings
  - | Opt_SuppressTypeSignatures
  - | Opt_SuppressUniques
  - | Opt_SuppressTicks
  - | Opt_AutoLinkPackages
  - | Opt_ImplicitImportQualified
  - | Opt_KeepHiDiffs
  - | Opt_KeepHcFiles
  - | Opt_KeepSFiles
  - | Opt_KeepTmpFiles
  - | Opt_KeepRawTokenStream
  - | Opt_KeepLlvmFiles
  - | Opt_KeepHiFiles
  - | Opt_KeepOFiles
  - | Opt_BuildDynamicToo
  - | Opt_DistrustAllPackages
  - | Opt_PackageTrust
  - | 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_WarnWarningsDeprecations
  - | Opt_WarnDeprecatedFlags
  - | Opt_WarnAMP
  - | Opt_WarnMissingMonadFailInstances
  - | Opt_WarnSemigroup
  - | Opt_WarnDodgyExports
  - | Opt_WarnDodgyImports
  - | Opt_WarnOrphans
  - | Opt_WarnAutoOrphans
  - | Opt_WarnIdentities
  - | Opt_WarnTabs
  - | Opt_WarnUnrecognisedPragmas
  - | Opt_WarnDodgyForeignImports
  - | Opt_WarnUnusedDoBind
  - | Opt_WarnWrongDoBind
  - | Opt_WarnAlternativeLayoutRuleTransitional
  - | Opt_WarnUnsafe
  - | Opt_WarnSafe
  - | Opt_WarnTrustworthySafe
  - | Opt_WarnMissedSpecs
  - | Opt_WarnAllMissedSpecs
  - | Opt_WarnUnsupportedCallingConventions
  - | Opt_WarnUnsupportedLlvmVersion
  - | 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
- data WarnReason
  - = NoReason
  - | Reason !WarningFlag
- data Language
  - = Haskell98
  - | Haskell2010
- data PlatformConstants = PlatformConstants {
  - pc_platformConstants :: ()
  - pc_CONTROL_GROUP_CONST_291 :: Int
  - pc_STD_HDR_SIZE :: Int
  - pc_PROF_HDR_SIZE :: Int
  - pc_BLOCK_SIZE :: Int
  - pc_BLOCKS_PER_MBLOCK :: Int
  - pc_TICKY_BIN_COUNT :: Int
  - pc_OFFSET_StgRegTable_rR1 :: Int
  - pc_OFFSET_StgRegTable_rR2 :: Int
  - pc_OFFSET_StgRegTable_rR3 :: Int
  - pc_OFFSET_StgRegTable_rR4 :: Int
  - pc_OFFSET_StgRegTable_rR5 :: Int
  - pc_OFFSET_StgRegTable_rR6 :: Int
  - pc_OFFSET_StgRegTable_rR7 :: Int
  - pc_OFFSET_StgRegTable_rR8 :: Int
  - pc_OFFSET_StgRegTable_rR9 :: Int
  - pc_OFFSET_StgRegTable_rR10 :: Int
  - pc_OFFSET_StgRegTable_rF1 :: Int
  - pc_OFFSET_StgRegTable_rF2 :: Int
  - pc_OFFSET_StgRegTable_rF3 :: Int
  - pc_OFFSET_StgRegTable_rF4 :: Int
  - pc_OFFSET_StgRegTable_rF5 :: Int
  - pc_OFFSET_StgRegTable_rF6 :: Int
  - pc_OFFSET_StgRegTable_rD1 :: Int
  - pc_OFFSET_StgRegTable_rD2 :: Int
  - pc_OFFSET_StgRegTable_rD3 :: Int
  - pc_OFFSET_StgRegTable_rD4 :: Int
  - pc_OFFSET_StgRegTable_rD5 :: Int
  - pc_OFFSET_StgRegTable_rD6 :: Int
  - pc_OFFSET_StgRegTable_rXMM1 :: Int
  - pc_OFFSET_StgRegTable_rXMM2 :: Int
  - pc_OFFSET_StgRegTable_rXMM3 :: Int
  - pc_OFFSET_StgRegTable_rXMM4 :: Int
  - pc_OFFSET_StgRegTable_rXMM5 :: Int
  - pc_OFFSET_StgRegTable_rXMM6 :: Int
  - pc_OFFSET_StgRegTable_rYMM1 :: Int
  - pc_OFFSET_StgRegTable_rYMM2 :: Int
  - pc_OFFSET_StgRegTable_rYMM3 :: Int
  - pc_OFFSET_StgRegTable_rYMM4 :: Int
  - pc_OFFSET_StgRegTable_rYMM5 :: Int
  - pc_OFFSET_StgRegTable_rYMM6 :: Int
  - pc_OFFSET_StgRegTable_rZMM1 :: Int
  - pc_OFFSET_StgRegTable_rZMM2 :: Int
  - pc_OFFSET_StgRegTable_rZMM3 :: Int
  - pc_OFFSET_StgRegTable_rZMM4 :: Int
  - pc_OFFSET_StgRegTable_rZMM5 :: Int
  - pc_OFFSET_StgRegTable_rZMM6 :: Int
  - pc_OFFSET_StgRegTable_rL1 :: Int
  - pc_OFFSET_StgRegTable_rSp :: Int
  - pc_OFFSET_StgRegTable_rSpLim :: Int
  - pc_OFFSET_StgRegTable_rHp :: Int
  - pc_OFFSET_StgRegTable_rHpLim :: Int
  - pc_OFFSET_StgRegTable_rCCCS :: Int
  - pc_OFFSET_StgRegTable_rCurrentTSO :: Int
  - pc_OFFSET_StgRegTable_rCurrentNursery :: Int
  - pc_OFFSET_StgRegTable_rHpAlloc :: Int
  - pc_OFFSET_stgEagerBlackholeInfo :: Int
  - pc_OFFSET_stgGCEnter1 :: Int
  - pc_OFFSET_stgGCFun :: Int
  - pc_OFFSET_Capability_r :: Int
  - pc_OFFSET_bdescr_start :: Int
  - pc_OFFSET_bdescr_free :: Int
  - pc_OFFSET_bdescr_blocks :: Int
  - pc_OFFSET_bdescr_flags :: Int
  - pc_SIZEOF_CostCentreStack :: Int
  - pc_OFFSET_CostCentreStack_mem_alloc :: Int
  - pc_REP_CostCentreStack_mem_alloc :: Int
  - pc_OFFSET_CostCentreStack_scc_count :: Int
  - pc_REP_CostCentreStack_scc_count :: Int
  - pc_OFFSET_StgHeader_ccs :: Int
  - pc_OFFSET_StgHeader_ldvw :: Int
  - pc_SIZEOF_StgSMPThunkHeader :: Int
  - pc_OFFSET_StgEntCounter_allocs :: Int
  - pc_REP_StgEntCounter_allocs :: Int
  - pc_OFFSET_StgEntCounter_allocd :: Int
  - pc_REP_StgEntCounter_allocd :: Int
  - pc_OFFSET_StgEntCounter_registeredp :: Int
  - pc_OFFSET_StgEntCounter_link :: Int
  - pc_OFFSET_StgEntCounter_entry_count :: Int
  - pc_SIZEOF_StgUpdateFrame_NoHdr :: Int
  - pc_SIZEOF_StgMutArrPtrs_NoHdr :: Int
  - pc_OFFSET_StgMutArrPtrs_ptrs :: Int
  - pc_OFFSET_StgMutArrPtrs_size :: Int
  - pc_SIZEOF_StgSmallMutArrPtrs_NoHdr :: Int
  - pc_OFFSET_StgSmallMutArrPtrs_ptrs :: Int
  - pc_SIZEOF_StgArrBytes_NoHdr :: Int
  - pc_OFFSET_StgArrBytes_bytes :: Int
  - pc_OFFSET_StgTSO_alloc_limit :: Int
  - pc_OFFSET_StgTSO_cccs :: Int
  - pc_OFFSET_StgTSO_stackobj :: Int
  - pc_OFFSET_StgStack_sp :: Int
  - pc_OFFSET_StgStack_stack :: Int
  - pc_OFFSET_StgUpdateFrame_updatee :: Int
  - pc_OFFSET_StgFunInfoExtraFwd_arity :: Int
  - pc_REP_StgFunInfoExtraFwd_arity :: Int
  - pc_SIZEOF_StgFunInfoExtraRev :: Int
  - pc_OFFSET_StgFunInfoExtraRev_arity :: Int
  - pc_REP_StgFunInfoExtraRev_arity :: Int
  - pc_MAX_SPEC_SELECTEE_SIZE :: Int
  - pc_MAX_SPEC_AP_SIZE :: Int
  - pc_MIN_PAYLOAD_SIZE :: Int
  - pc_MIN_INTLIKE :: Int
  - pc_MAX_INTLIKE :: Int
  - pc_MIN_CHARLIKE :: Int
  - pc_MAX_CHARLIKE :: Int
  - pc_MUT_ARR_PTRS_CARD_BITS :: Int
  - pc_MAX_Vanilla_REG :: Int
  - pc_MAX_Float_REG :: Int
  - pc_MAX_Double_REG :: Int
  - pc_MAX_Long_REG :: Int
  - pc_MAX_XMM_REG :: Int
  - pc_MAX_Real_Vanilla_REG :: Int
  - pc_MAX_Real_Float_REG :: Int
  - pc_MAX_Real_Double_REG :: Int
  - pc_MAX_Real_XMM_REG :: Int
  - pc_MAX_Real_Long_REG :: Int
  - pc_RESERVED_C_STACK_BYTES :: Int
  - pc_RESERVED_STACK_WORDS :: Int
  - pc_AP_STACK_SPLIM :: Int
  - pc_WORD_SIZE :: Int
  - pc_DOUBLE_SIZE :: Int
  - pc_CINT_SIZE :: Int
  - pc_CLONG_SIZE :: Int
  - pc_CLONG_LONG_SIZE :: Int
  - pc_BITMAP_BITS_SHIFT :: Int
  - pc_TAG_BITS :: Int
  - pc_WORDS_BIGENDIAN :: Bool
  - pc_DYNAMIC_BY_DEFAULT :: Bool
  - pc_LDV_SHIFT :: Int
  - pc_ILDV_CREATE_MASK :: Integer
  - pc_ILDV_STATE_CREATE :: Integer
  - pc_ILDV_STATE_USE :: Integer
  }
- type FatalMessager = String -> IO ()
- type LogAction = DynFlags -> WarnReason -> Severity -> SrcSpan -> PprStyle -> MsgDoc -> IO ()
- type LogFinaliser = DynFlags -> IO ()
- newtype FlushOut = FlushOut (IO ())
- newtype FlushErr = FlushErr (IO ())
- data ProfAuto
  - = NoProfAuto
  - | ProfAutoAll
  - | ProfAutoTop
  - | ProfAutoExports
  - | ProfAutoCalls
- glasgowExtsFlags :: [Extension]
- warningGroups :: [(String, [WarningFlag])]
- warningHierarchies :: [[String]]
- 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
- setGeneralFlag' :: GeneralFlag -> DynFlags -> DynFlags
- unSetGeneralFlag' :: GeneralFlag -> DynFlags -> DynFlags
- wopt :: WarningFlag -> DynFlags -> Bool
- wopt_set :: DynFlags -> WarningFlag -> DynFlags
- wopt_unset :: DynFlags -> WarningFlag -> DynFlags
- wopt_fatal :: WarningFlag -> DynFlags -> Bool
- xopt :: Extension -> DynFlags -> Bool
- xopt_set :: DynFlags -> Extension -> DynFlags
- xopt_unset :: DynFlags -> Extension -> DynFlags
- lang_set :: DynFlags -> Maybe Language -> DynFlags
- useUnicodeSyntax :: DynFlags -> Bool
- whenGeneratingDynamicToo :: MonadIO m => DynFlags -> m () -> m ()
- ifGeneratingDynamicToo :: MonadIO m => DynFlags -> m a -> m a -> m a
- whenCannotGenerateDynamicToo :: MonadIO m => DynFlags -> m () -> m ()
- dynamicTooMkDynamicDynFlags :: DynFlags -> DynFlags
- data DynFlags = DynFlags {
  - ghcMode :: GhcMode
  - ghcLink :: GhcLink
  - hscTarget :: HscTarget
  - settings :: Settings
  - verbosity :: Int
  - optLevel :: Int
  - debugLevel :: Int
  - simplPhases :: Int
  - maxSimplIterations :: Int
  - maxPmCheckIterations :: Int
  - ruleCheck :: Maybe String
  - strictnessBefore :: [Int]
  - parMakeCount :: Maybe Int
  - enableTimeStats :: Bool
  - ghcHeapSize :: Maybe Int
  - maxRelevantBinds :: Maybe Int
  - maxUncoveredPatterns :: Int
  - simplTickFactor :: Int
  - specConstrThreshold :: Maybe Int
  - specConstrCount :: Maybe Int
  - specConstrRecursive :: Int
  - liberateCaseThreshold :: Maybe Int
  - floatLamArgs :: Maybe Int
  - historySize :: Int
  - importPaths :: [FilePath]
  - mainModIs :: Module
  - mainFunIs :: Maybe String
  - reductionDepth :: IntWithInf
  - solverIterations :: IntWithInf
  - thisInstalledUnitId :: InstalledUnitId
  - thisComponentId_ :: Maybe ComponentId
  - thisUnitIdInsts_ :: Maybe [(ModuleName, Module)]
  - ways :: [Way]
  - buildTag :: String
  - rtsBuildTag :: String
  - splitInfo :: Maybe (String, Int)
  - objectDir :: Maybe String
  - dylibInstallName :: Maybe String
  - hiDir :: Maybe String
  - stubDir :: Maybe String
  - dumpDir :: Maybe String
  - objectSuf :: String
  - hcSuf :: String
  - hiSuf :: String
  - canGenerateDynamicToo :: IORef Bool
  - dynObjectSuf :: String
  - dynHiSuf :: String
  - dllSplitFile :: Maybe FilePath
  - dllSplit :: Maybe [Set String]
  - outputFile :: Maybe String
  - dynOutputFile :: Maybe String
  - outputHi :: Maybe String
  - dynLibLoader :: DynLibLoader
  - dumpPrefix :: Maybe FilePath
  - dumpPrefixForce :: Maybe FilePath
  - ldInputs :: [Option]
  - includePaths :: [String]
  - libraryPaths :: [String]
  - frameworkPaths :: [String]
  - cmdlineFrameworks :: [String]
  - rtsOpts :: Maybe String
  - rtsOptsEnabled :: RtsOptsEnabled
  - rtsOptsSuggestions :: Bool
  - hpcDir :: String
  - pluginModNames :: [ModuleName]
  - pluginModNameOpts :: [(ModuleName, String)]
  - frontendPluginOpts :: [String]
  - hooks :: Hooks
  - depMakefile :: FilePath
  - depIncludePkgDeps :: Bool
  - depExcludeMods :: [ModuleName]
  - depSuffixes :: [String]
  - packageDBFlags :: [PackageDBFlag]
  - ignorePackageFlags :: [IgnorePackageFlag]
  - packageFlags :: [PackageFlag]
  - pluginPackageFlags :: [PackageFlag]
  - trustFlags :: [TrustFlag]
  - packageEnv :: Maybe FilePath
  - pkgDatabase :: Maybe [(FilePath, [PackageConfig])]
  - pkgState :: PackageState
  - filesToClean :: IORef [FilePath]
  - dirsToClean :: IORef (Map FilePath FilePath)
  - filesToNotIntermediateClean :: IORef [FilePath]
  - nextTempSuffix :: IORef Int
  - generatedDumps :: IORef (Set FilePath)
  - dumpFlags :: IntSet
  - generalFlags :: IntSet
  - warningFlags :: IntSet
  - fatalWarningFlags :: IntSet
  - language :: Maybe Language
  - safeHaskell :: SafeHaskellMode
  - safeInfer :: Bool
  - safeInferred :: Bool
  - thOnLoc :: SrcSpan
  - newDerivOnLoc :: SrcSpan
  - overlapInstLoc :: SrcSpan
  - incoherentOnLoc :: SrcSpan
  - pkgTrustOnLoc :: SrcSpan
  - warnSafeOnLoc :: SrcSpan
  - warnUnsafeOnLoc :: SrcSpan
  - trustworthyOnLoc :: SrcSpan
  - extensions :: [OnOff Extension]
  - extensionFlags :: IntSet
  - ufCreationThreshold :: Int
  - ufUseThreshold :: Int
  - ufFunAppDiscount :: Int
  - ufDictDiscount :: Int
  - ufKeenessFactor :: Float
  - ufDearOp :: Int
  - ufVeryAggressive :: Bool
  - maxWorkerArgs :: Int
  - ghciHistSize :: Int
  - initLogAction :: IO (Maybe LogOutput)
  - log_action :: LogAction
  - log_finaliser :: LogFinaliser
  - flushOut :: FlushOut
  - flushErr :: FlushErr
  - haddockOptions :: Maybe String
  - ghciScripts :: [String]
  - pprUserLength :: Int
  - pprCols :: Int
  - useUnicode :: Bool
  - useColor :: OverridingBool
  - canUseColor :: Bool
  - colScheme :: Scheme
  - profAuto :: ProfAuto
  - interactivePrint :: Maybe String
  - nextWrapperNum :: IORef (ModuleEnv Int)
  - sseVersion :: Maybe SseVersion
  - avx :: Bool
  - avx2 :: Bool
  - avx512cd :: Bool
  - avx512er :: Bool
  - avx512f :: Bool
  - avx512pf :: Bool
  - rtldInfo :: IORef (Maybe LinkerInfo)
  - rtccInfo :: IORef (Maybe CompilerInfo)
  - maxInlineAllocSize :: Int
  - maxInlineMemcpyInsns :: Int
  - maxInlineMemsetInsns :: Int
  - reverseErrors :: Bool
  - maxErrors :: Maybe Int
  - initialUnique :: Int
  - uniqueIncrement :: Int
  }
- data FlagSpec flag = FlagSpec {
  - flagSpecName :: String
  - flagSpecFlag :: flag
  - flagSpecAction :: TurnOnFlag -> DynP ()
  - flagSpecGhcMode :: GhcFlagMode
  }
- class HasDynFlags m where
- class ContainsDynFlags t where
- data RtsOptsEnabled
  - = RtsOptsNone
  - | RtsOptsSafeOnly
  - | RtsOptsAll
- data HscTarget
  - = HscC
  - | HscAsm
  - | HscLlvm
  - | HscInterpreted
  - | HscNothing
- isObjectTarget :: HscTarget -> Bool
- defaultObjectTarget :: Platform -> HscTarget
- targetRetainsAllBindings :: HscTarget -> Bool
- data GhcMode
  - = CompManager
  - | OneShot
  - | MkDepend
- isOneShot :: GhcMode -> Bool
- data GhcLink
  - = NoLink
  - | LinkBinary
  - | LinkInMemory
  - | LinkDynLib
  - | LinkStaticLib
- isNoLink :: GhcLink -> Bool
- data PackageFlag
  - = ExposePackage String PackageArg ModRenaming
  - | HidePackage String
- data PackageArg
  - = PackageArg String
  - | UnitIdArg UnitId
- 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 PkgConfRef
  - | NoUserPackageDB
  - | NoGlobalPackageDB
  - | ClearPackageDBs
- data PkgConfRef
  - = GlobalPkgConf
  - | UserPkgConf
  - | PkgConfFile FilePath
- data Option
  - = FileOption String String
  - | Option String
- showOpt :: Option -> String
- data DynLibLoader
  - = Deployable
  - | SystemDependent
- fFlags :: [FlagSpec GeneralFlag]
- fLangFlags :: [FlagSpec Extension]
- xFlags :: [FlagSpec Extension]
- wWarningFlags :: [FlagSpec WarningFlag]
- dynFlagDependencies :: DynFlags -> [ModuleName]
- tablesNextToCode :: DynFlags -> Bool
- mkTablesNextToCode :: Bool -> Bool
- makeDynFlagsConsistent :: DynFlags -> (DynFlags, [Located String])
- shouldUseColor :: DynFlags -> Bool
- positionIndependent :: DynFlags -> Bool
- data Way
  - = WayCustom String
  - | WayThreaded
  - | WayDebug
  - | WayProf
  - | WayEventLog
  - | WayDyn
- mkBuildTag :: [Way] -> String
- wayRTSOnly :: Way -> Bool
- addWay' :: Way -> DynFlags -> DynFlags
- updateWays :: DynFlags -> DynFlags
- wayGeneralFlags :: Platform -> Way -> [GeneralFlag]
- wayUnsetGeneralFlags :: Platform -> Way -> [GeneralFlag]
- thisPackage :: DynFlags -> UnitId
- thisComponentId :: DynFlags -> ComponentId
- thisUnitIdInsts :: DynFlags -> [(ModuleName, Module)]
- putLogMsg :: DynFlags -> WarnReason -> Severity -> SrcSpan -> PprStyle -> MsgDoc -> IO ()
- data SafeHaskellMode
  - = Sf_None
  - | Sf_Unsafe
  - | Sf_Trustworthy
  - | Sf_Safe
- safeHaskellOn :: DynFlags -> Bool
- safeImportsOn :: DynFlags -> Bool
- safeLanguageOn :: DynFlags -> Bool
- safeInferOn :: DynFlags -> Bool
- packageTrustOn :: DynFlags -> Bool
- safeDirectImpsReq :: DynFlags -> Bool
- safeImplicitImpsReq :: DynFlags -> Bool
- unsafeFlags :: [(String, DynFlags -> SrcSpan, DynFlags -> Bool, DynFlags -> DynFlags)]
- unsafeFlagsForInfer :: [(String, DynFlags -> SrcSpan, DynFlags -> Bool, DynFlags -> DynFlags)]
- data Settings = Settings {
  - sTargetPlatform :: Platform
  - sGhcUsagePath :: FilePath
  - sGhciUsagePath :: FilePath
  - sTopDir :: FilePath
  - sTmpDir :: String
  - sProgramName :: String
  - sProjectVersion :: String
  - sRawSettings :: [(String, String)]
  - sExtraGccViaCFlags :: [String]
  - sSystemPackageConfig :: FilePath
  - sLdSupportsCompactUnwind :: Bool
  - sLdSupportsBuildId :: Bool
  - sLdSupportsFilelist :: Bool
  - sLdIsGnuLd :: Bool
  - sGccSupportsNoPie :: Bool
  - sPgm_L :: String
  - sPgm_P :: (String, [Option])
  - sPgm_F :: String
  - sPgm_c :: (String, [Option])
  - sPgm_s :: (String, [Option])
  - sPgm_a :: (String, [Option])
  - sPgm_l :: (String, [Option])
  - sPgm_dll :: (String, [Option])
  - sPgm_T :: String
  - sPgm_windres :: String
  - sPgm_libtool :: String
  - sPgm_lo :: (String, [Option])
  - sPgm_lc :: (String, [Option])
  - sPgm_i :: String
  - sOpt_L :: [String]
  - sOpt_P :: [String]
  - sOpt_F :: [String]
  - sOpt_c :: [String]
  - sOpt_a :: [String]
  - sOpt_l :: [String]
  - sOpt_windres :: [String]
  - sOpt_lo :: [String]
  - sOpt_lc :: [String]
  - sOpt_i :: [String]
  - sPlatformConstants :: PlatformConstants
  }
- targetPlatform :: DynFlags -> Platform
- programName :: DynFlags -> String
- projectVersion :: DynFlags -> String
- ghcUsagePath :: DynFlags -> FilePath
- ghciUsagePath :: DynFlags -> FilePath
- topDir :: DynFlags -> FilePath
- tmpDir :: DynFlags -> String
- rawSettings :: DynFlags -> [(String, String)]
- versionedAppDir :: DynFlags -> MaybeT IO FilePath
- extraGccViaCFlags :: DynFlags -> [String]
- systemPackageConfig :: DynFlags -> FilePath
- pgm_L :: DynFlags -> String
- pgm_P :: DynFlags -> (String, [Option])
- pgm_F :: DynFlags -> String
- pgm_c :: DynFlags -> (String, [Option])
- pgm_s :: DynFlags -> (String, [Option])
- pgm_a :: DynFlags -> (String, [Option])
- pgm_l :: DynFlags -> (String, [Option])
- pgm_dll :: DynFlags -> (String, [Option])
- pgm_T :: DynFlags -> String
- pgm_windres :: DynFlags -> String
- pgm_libtool :: DynFlags -> String
- pgm_lo :: DynFlags -> (String, [Option])
- pgm_lc :: DynFlags -> (String, [Option])
- pgm_i :: DynFlags -> String
- opt_L :: DynFlags -> [String]
- opt_P :: DynFlags -> [String]
- opt_F :: DynFlags -> [String]
- opt_c :: DynFlags -> [String]
- opt_a :: DynFlags -> [String]
- opt_l :: DynFlags -> [String]
- opt_i :: DynFlags -> [String]
- opt_windres :: DynFlags -> [String]
- opt_lo :: DynFlags -> [String]
- opt_lc :: DynFlags -> [String]
- defaultDynFlags :: Settings -> DynFlags
- defaultWays :: Settings -> [Way]
- interpWays :: [Way]
- interpreterProfiled :: DynFlags -> Bool
- interpreterDynamic :: DynFlags -> Bool
- initDynFlags :: DynFlags -> IO DynFlags
- defaultFatalMessager :: FatalMessager
- defaultLogAction :: LogAction
- defaultLogActionHPrintDoc :: DynFlags -> Handle -> SDoc -> PprStyle -> IO ()
- defaultLogActionHPutStrDoc :: DynFlags -> Handle -> SDoc -> PprStyle -> IO ()
- defaultFlushOut :: FlushOut
- defaultFlushErr :: FlushErr
- getOpts :: DynFlags -> (DynFlags -> [a]) -> [a]
- getVerbFlags :: DynFlags -> [String]
- updOptLevel :: Int -> DynFlags -> DynFlags
- setTmpDir :: FilePath -> DynFlags -> DynFlags
- setUnitId :: String -> DynFlags -> DynFlags
- interpretPackageEnv :: DynFlags -> IO DynFlags
- canonicalizeHomeModule :: DynFlags -> ModuleName -> Module
- parseDynamicFlagsCmdLine :: MonadIO m => DynFlags -> [Located String] -> m (DynFlags, [Located String], [Located String])
- parseDynamicFilePragma :: MonadIO m => DynFlags -> [Located String] -> m (DynFlags, [Located String], [Located String])
- parseDynamicFlagsFull :: MonadIO m => [Flag (CmdLineP DynFlags)] -> Bool -> DynFlags -> [Located String] -> m (DynFlags, [Located String], [Located String])
- allNonDeprecatedFlags :: [String]
- flagsAll :: [Flag (CmdLineP DynFlags)]
- flagsDynamic :: [Flag (CmdLineP DynFlags)]
- flagsPackage :: [Flag (CmdLineP DynFlags)]
- flagsForCompletion :: Bool -> [String]
- supportedLanguagesAndExtensions :: [String]
- languageExtensions :: Maybe Language -> [Extension]
- picCCOpts :: DynFlags -> [String]
- picPOpts :: DynFlags -> [String]
- compilerInfo :: DynFlags -> [(String, String)]
- rtsIsProfiled :: Bool
- dynamicGhc :: Bool
- cONTROL_GROUP_CONST_291 :: DynFlags -> Int
- sTD_HDR_SIZE :: DynFlags -> Int
- pROF_HDR_SIZE :: DynFlags -> Int
- bLOCK_SIZE :: DynFlags -> Int
- bLOCKS_PER_MBLOCK :: DynFlags -> Int
- tICKY_BIN_COUNT :: DynFlags -> Int
- oFFSET_StgRegTable_rR1 :: DynFlags -> Int
- oFFSET_StgRegTable_rR2 :: DynFlags -> Int
- oFFSET_StgRegTable_rR3 :: DynFlags -> Int
- oFFSET_StgRegTable_rR4 :: DynFlags -> Int
- oFFSET_StgRegTable_rR5 :: DynFlags -> Int
- oFFSET_StgRegTable_rR6 :: DynFlags -> Int
- oFFSET_StgRegTable_rR7 :: DynFlags -> Int
- oFFSET_StgRegTable_rR8 :: DynFlags -> Int
- oFFSET_StgRegTable_rR9 :: DynFlags -> Int
- oFFSET_StgRegTable_rR10 :: DynFlags -> Int
- oFFSET_StgRegTable_rF1 :: DynFlags -> Int
- oFFSET_StgRegTable_rF2 :: DynFlags -> Int
- oFFSET_StgRegTable_rF3 :: DynFlags -> Int
- oFFSET_StgRegTable_rF4 :: DynFlags -> Int
- oFFSET_StgRegTable_rF5 :: DynFlags -> Int
- oFFSET_StgRegTable_rF6 :: DynFlags -> Int
- oFFSET_StgRegTable_rD1 :: DynFlags -> Int
- oFFSET_StgRegTable_rD2 :: DynFlags -> Int
- oFFSET_StgRegTable_rD3 :: DynFlags -> Int
- oFFSET_StgRegTable_rD4 :: DynFlags -> Int
- oFFSET_StgRegTable_rD5 :: DynFlags -> Int
- oFFSET_StgRegTable_rD6 :: DynFlags -> Int
- oFFSET_StgRegTable_rXMM1 :: DynFlags -> Int
- oFFSET_StgRegTable_rXMM2 :: DynFlags -> Int
- oFFSET_StgRegTable_rXMM3 :: DynFlags -> Int
- oFFSET_StgRegTable_rXMM4 :: DynFlags -> Int
- oFFSET_StgRegTable_rXMM5 :: DynFlags -> Int
- oFFSET_StgRegTable_rXMM6 :: DynFlags -> Int
- oFFSET_StgRegTable_rYMM1 :: DynFlags -> Int
- oFFSET_StgRegTable_rYMM2 :: DynFlags -> Int
- oFFSET_StgRegTable_rYMM3 :: DynFlags -> Int
- oFFSET_StgRegTable_rYMM4 :: DynFlags -> Int
- oFFSET_StgRegTable_rYMM5 :: DynFlags -> Int
- oFFSET_StgRegTable_rYMM6 :: DynFlags -> Int
- oFFSET_StgRegTable_rZMM1 :: DynFlags -> Int
- oFFSET_StgRegTable_rZMM2 :: DynFlags -> Int
- oFFSET_StgRegTable_rZMM3 :: DynFlags -> Int
- oFFSET_StgRegTable_rZMM4 :: DynFlags -> Int
- oFFSET_StgRegTable_rZMM5 :: DynFlags -> Int
- oFFSET_StgRegTable_rZMM6 :: DynFlags -> Int
- oFFSET_StgRegTable_rL1 :: DynFlags -> Int
- oFFSET_StgRegTable_rSp :: DynFlags -> Int
- oFFSET_StgRegTable_rSpLim :: DynFlags -> Int
- oFFSET_StgRegTable_rHp :: DynFlags -> Int
- oFFSET_StgRegTable_rHpLim :: DynFlags -> Int
- oFFSET_StgRegTable_rCCCS :: DynFlags -> Int
- oFFSET_StgRegTable_rCurrentTSO :: DynFlags -> Int
- oFFSET_StgRegTable_rCurrentNursery :: DynFlags -> Int
- oFFSET_StgRegTable_rHpAlloc :: DynFlags -> Int
- oFFSET_stgEagerBlackholeInfo :: DynFlags -> Int
- oFFSET_stgGCEnter1 :: DynFlags -> Int
- oFFSET_stgGCFun :: DynFlags -> Int
- oFFSET_Capability_r :: DynFlags -> Int
- oFFSET_bdescr_start :: DynFlags -> Int
- oFFSET_bdescr_free :: DynFlags -> Int
- oFFSET_bdescr_blocks :: DynFlags -> Int
- oFFSET_bdescr_flags :: DynFlags -> Int
- sIZEOF_CostCentreStack :: DynFlags -> Int
- oFFSET_CostCentreStack_mem_alloc :: DynFlags -> Int
- oFFSET_CostCentreStack_scc_count :: DynFlags -> Int
- oFFSET_StgHeader_ccs :: DynFlags -> Int
- oFFSET_StgHeader_ldvw :: DynFlags -> Int
- sIZEOF_StgSMPThunkHeader :: DynFlags -> Int
- oFFSET_StgEntCounter_allocs :: DynFlags -> Int
- oFFSET_StgEntCounter_allocd :: DynFlags -> Int
- oFFSET_StgEntCounter_registeredp :: DynFlags -> Int
- oFFSET_StgEntCounter_link :: DynFlags -> Int
- oFFSET_StgEntCounter_entry_count :: DynFlags -> Int
- sIZEOF_StgUpdateFrame_NoHdr :: DynFlags -> Int
- sIZEOF_StgMutArrPtrs_NoHdr :: DynFlags -> Int
- oFFSET_StgMutArrPtrs_ptrs :: DynFlags -> Int
- oFFSET_StgMutArrPtrs_size :: DynFlags -> Int
- sIZEOF_StgSmallMutArrPtrs_NoHdr :: DynFlags -> Int
- oFFSET_StgSmallMutArrPtrs_ptrs :: DynFlags -> Int
- sIZEOF_StgArrBytes_NoHdr :: DynFlags -> Int
- oFFSET_StgArrBytes_bytes :: DynFlags -> Int
- oFFSET_StgTSO_alloc_limit :: DynFlags -> Int
- oFFSET_StgTSO_cccs :: DynFlags -> Int
- oFFSET_StgTSO_stackobj :: DynFlags -> Int
- oFFSET_StgStack_sp :: DynFlags -> Int
- oFFSET_StgStack_stack :: DynFlags -> Int
- oFFSET_StgUpdateFrame_updatee :: DynFlags -> Int
- oFFSET_StgFunInfoExtraFwd_arity :: DynFlags -> Int
- sIZEOF_StgFunInfoExtraRev :: DynFlags -> Int
- oFFSET_StgFunInfoExtraRev_arity :: DynFlags -> Int
- mAX_SPEC_SELECTEE_SIZE :: DynFlags -> Int
- mAX_SPEC_AP_SIZE :: DynFlags -> Int
- mIN_PAYLOAD_SIZE :: DynFlags -> Int
- mIN_INTLIKE :: DynFlags -> Int
- mAX_INTLIKE :: DynFlags -> Int
- mIN_CHARLIKE :: DynFlags -> Int
- mAX_CHARLIKE :: DynFlags -> Int
- mUT_ARR_PTRS_CARD_BITS :: DynFlags -> Int
- mAX_Vanilla_REG :: DynFlags -> Int
- mAX_Float_REG :: DynFlags -> Int
- mAX_Double_REG :: DynFlags -> Int
- mAX_Long_REG :: DynFlags -> Int
- mAX_XMM_REG :: DynFlags -> Int
- mAX_Real_Vanilla_REG :: DynFlags -> Int
- mAX_Real_Float_REG :: DynFlags -> Int
- mAX_Real_Double_REG :: DynFlags -> Int
- mAX_Real_XMM_REG :: DynFlags -> Int
- mAX_Real_Long_REG :: DynFlags -> Int
- rESERVED_C_STACK_BYTES :: DynFlags -> Int
- rESERVED_STACK_WORDS :: DynFlags -> Int
- aP_STACK_SPLIM :: DynFlags -> Int
- wORD_SIZE :: DynFlags -> Int
- dOUBLE_SIZE :: DynFlags -> Int
- cINT_SIZE :: DynFlags -> Int
- cLONG_SIZE :: DynFlags -> Int
- cLONG_LONG_SIZE :: DynFlags -> Int
- bITMAP_BITS_SHIFT :: DynFlags -> Int
- tAG_BITS :: DynFlags -> Int
- wORDS_BIGENDIAN :: DynFlags -> Bool
- dYNAMIC_BY_DEFAULT :: DynFlags -> Bool
- lDV_SHIFT :: DynFlags -> Int
- iLDV_CREATE_MASK :: DynFlags -> Integer
- iLDV_STATE_CREATE :: DynFlags -> Integer
- iLDV_STATE_USE :: DynFlags -> Integer
- bLOCK_SIZE_W :: DynFlags -> Int
- wORD_SIZE_IN_BITS :: DynFlags -> Int
- tAG_MASK :: DynFlags -> Int
- mAX_PTR_TAG :: DynFlags -> Int
- tARGET_MIN_INT :: DynFlags -> Integer
- tARGET_MAX_INT :: DynFlags -> Integer
- tARGET_MAX_WORD :: DynFlags -> Integer
- unsafeGlobalDynFlags :: DynFlags
- setUnsafeGlobalDynFlags :: DynFlags -> IO ()
- isSseEnabled :: DynFlags -> Bool
- isSse2Enabled :: DynFlags -> Bool
- isSse4_2Enabled :: DynFlags -> Bool
- isAvxEnabled :: DynFlags -> Bool
- isAvx2Enabled :: DynFlags -> Bool
- isAvx512cdEnabled :: DynFlags -> Bool
- isAvx512erEnabled :: DynFlags -> Bool
- isAvx512fEnabled :: DynFlags -> Bool
- isAvx512pfEnabled :: DynFlags -> Bool
- data LinkerInfo
  - = GnuLD [Option]
  - | GnuGold [Option]
  - | DarwinLD [Option]
  - | SolarisLD [Option]
  - | AixLD [Option]
  - | UnknownLD
- data CompilerInfo
  - = GCC
  - | Clang
  - | AppleClang
  - | AppleClang51
  - | UnknownCC

# Dynamic flags and associated configuration types

data DumpFlag #

Constructors

Opt_D_dump_cmm |
Opt_D_dump_cmm_from_stg |
Opt_D_dump_cmm_raw |
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_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_asm_expanded |
Opt_D_dump_llvm |
Opt_D_dump_core_stats |
Opt_D_dump_deriv |
Opt_D_dump_ds |
Opt_D_dump_foreign |
Opt_D_dump_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_shape |
Opt_D_dump_simpl |
Opt_D_dump_simpl_iterations |
Opt_D_dump_spec |
Opt_D_dump_prep |
Opt_D_dump_stg |
Opt_D_dump_call_arity |
Opt_D_dump_stranal |
Opt_D_dump_str_signatures |
Opt_D_dump_tc |
Opt_D_dump_tc_ast |
Opt_D_dump_types |
Opt_D_dump_rules |
Opt_D_dump_cse |
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_vt_trace |
Opt_D_dump_splices |
Opt_D_th_dec_file |
Opt_D_dump_BCOs |
Opt_D_dump_vect |
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_view_pattern_commoning |
Opt_D_verbose_core2core |
Opt_D_dump_debug |
Opt_D_dump_json |
Opt_D_ppr_debug |
Opt_D_no_debug_output |

Instances

Enum DumpFlag # |
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 #
Eq DumpFlag # |
Methods (==) :: DumpFlag -> DumpFlag -> Bool # (/=) :: DumpFlag -> DumpFlag -> Bool #
Show DumpFlag # |
Methods showsPrec :: Int -> DumpFlag -> ShowS Source # show :: DumpFlag -> String Source # showList :: [DumpFlag] -> ShowS Source #

data GeneralFlag #

Enumerates the simple on-or-off dynamic flags

Constructors

Opt_DumpToFile | Append dump output to files instead of stdout.
Opt_D_faststring_stats |
Opt_D_dump_minimal_imports |
Opt_DoCoreLinting |
Opt_DoStgLinting |
Opt_DoCmmLinting |
Opt_DoAsmLinting |
Opt_DoAnnotationLinting |
Opt_NoLlvmMangler |
Opt_WarnIsError |
Opt_ShowWarnGroups |
Opt_HideSourcePaths |
Opt_PrintExplicitForalls |
Opt_PrintExplicitKinds |
Opt_PrintExplicitCoercions |
Opt_PrintExplicitRuntimeReps |
Opt_PrintEqualityRelations |
Opt_PrintUnicodeSyntax |
Opt_PrintExpandedSynonyms |
Opt_PrintPotentialInstances |
Opt_PrintTypecheckerElaboration |
Opt_CallArity |
Opt_Strictness |
Opt_LateDmdAnal |
Opt_KillAbsence |
Opt_KillOneShot |
Opt_FullLaziness |
Opt_FloatIn |
Opt_Specialise |
Opt_SpecialiseAggressively |
Opt_CrossModuleSpecialise |
Opt_StaticArgumentTransformation |
Opt_CSE |
Opt_StgCSE |
Opt_LiberateCase |
Opt_SpecConstr |
Opt_SpecConstrKeen |
Opt_DoLambdaEtaExpansion |
Opt_IgnoreAsserts |
Opt_DoEtaReduction |
Opt_CaseMerge |
Opt_CaseFolding |
Opt_UnboxStrictFields |
Opt_UnboxSmallStrictFields |
Opt_DictsCheap |
Opt_EnableRewriteRules |
Opt_Vectorise |
Opt_VectorisationAvoidance |
Opt_RegsGraph |
Opt_RegsIterative |
Opt_PedanticBottoms |
Opt_LlvmTBAA |
Opt_LlvmPassVectorsInRegisters |
Opt_LlvmFillUndefWithGarbage |
Opt_IrrefutableTuples |
Opt_CmmSink |
Opt_CmmElimCommonBlocks |
Opt_OmitYields |
Opt_FunToThunk |
Opt_DictsStrict |
Opt_DmdTxDictSel |
Opt_Loopification |
Opt_CprAnal |
Opt_WorkerWrapper |
Opt_SolveConstantDicts |
Opt_IgnoreInterfacePragmas |
Opt_OmitInterfacePragmas |
Opt_ExposeAllUnfoldings |
Opt_WriteInterface |
Opt_AutoSccsOnIndividualCafs |
Opt_ProfCountEntries |
Opt_Pp |
Opt_ForceRecomp |
Opt_ExcessPrecision |
Opt_EagerBlackHoling |
Opt_NoHsMain |
Opt_SplitObjs |
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_GhciHistory |
Opt_LocalGhciHistory |
Opt_HelpfulErrors |
Opt_DeferTypeErrors |
Opt_DeferTypedHoles |
Opt_DeferOutOfScopeVariables |

Opt_PIC

    -fPIC

Opt_PIE

    -fPIE

Opt_PICExecutable

    -pie

Opt_SccProfilingOn |
Opt_Ticky |
Opt_Ticky_Allocd |
Opt_Ticky_LNE |
Opt_Ticky_Dyn_Thunk |
Opt_RPath |
Opt_RelativeDynlibPaths |
Opt_Hpc |
Opt_FlatCache |
Opt_ExternalInterpreter |
Opt_OptimalApplicativeDo |
Opt_VersionMacros |
Opt_WholeArchiveHsLibs |
Opt_SimplPreInlining |
Opt_ErrorSpans |
Opt_DiagnosticsShowCaret |
Opt_PprCaseAsLet |
Opt_PprShowTicks |
Opt_ShowHoleConstraints |
Opt_ShowLoadedModules |
Opt_SuppressCoercions |
Opt_SuppressVarKinds |
Opt_SuppressModulePrefixes |
Opt_SuppressTypeApplications |
Opt_SuppressIdInfo |
Opt_SuppressUnfoldings |
Opt_SuppressTypeSignatures |
Opt_SuppressUniques |
Opt_SuppressTicks |
Opt_AutoLinkPackages |
Opt_ImplicitImportQualified |
Opt_KeepHiDiffs |
Opt_KeepHcFiles |
Opt_KeepSFiles |
Opt_KeepTmpFiles |
Opt_KeepRawTokenStream |
Opt_KeepLlvmFiles |
Opt_KeepHiFiles |
Opt_KeepOFiles |
Opt_BuildDynamicToo |
Opt_DistrustAllPackages |
Opt_PackageTrust |
Opt_G_NoStateHack |
Opt_G_NoOptCoercion |

Instances

Enum GeneralFlag # |

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 #

Eq GeneralFlag # |
Methods (==) :: GeneralFlag -> GeneralFlag -> Bool # (/=) :: GeneralFlag -> GeneralFlag -> Bool #
Show GeneralFlag # |
Methods showsPrec :: Int -> GeneralFlag -> ShowS Source # show :: GeneralFlag -> String Source # showList :: [GeneralFlag] -> ShowS Source #

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_WarnWarningsDeprecations |
Opt_WarnDeprecatedFlags |
Opt_WarnAMP |
Opt_WarnMissingMonadFailInstances |
Opt_WarnSemigroup |
Opt_WarnDodgyExports |
Opt_WarnDodgyImports |
Opt_WarnOrphans |
Opt_WarnAutoOrphans |
Opt_WarnIdentities |
Opt_WarnTabs |
Opt_WarnUnrecognisedPragmas |
Opt_WarnDodgyForeignImports |
Opt_WarnUnusedDoBind |
Opt_WarnWrongDoBind |
Opt_WarnAlternativeLayoutRuleTransitional |
Opt_WarnUnsafe |
Opt_WarnSafe |
Opt_WarnTrustworthySafe |
Opt_WarnMissedSpecs |
Opt_WarnAllMissedSpecs |
Opt_WarnUnsupportedCallingConventions |
Opt_WarnUnsupportedLlvmVersion |
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 |

Instances

Enum WarningFlag # |

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 #

Eq WarningFlag # |
Methods (==) :: WarningFlag -> WarningFlag -> Bool # (/=) :: WarningFlag -> WarningFlag -> Bool #
Show WarningFlag # |
Methods showsPrec :: Int -> WarningFlag -> ShowS Source # show :: WarningFlag -> String Source # showList :: [WarningFlag] -> ShowS Source #

data WarnReason #

Used when outputting warnings: if a reason is given, it is displayed. If a warning isn't controlled by a flag, this is made explicit at the point of use.

Constructors

NoReason |
Reason !WarningFlag |

Instances

Show WarnReason # |
Methods showsPrec :: Int -> WarnReason -> ShowS Source # show :: WarnReason -> String Source # showList :: [WarnReason] -> ShowS Source #
Outputable WarnReason # |
Methods ppr :: WarnReason -> SDoc # pprPrec :: Rational -> WarnReason -> SDoc #
ToJson WarnReason # |
Methods json :: WarnReason -> JsonDoc #

data Language #

Constructors

Haskell98 |
Haskell2010 |

Instances

Enum Language # |
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 #
Eq Language # |
Methods (==) :: Language -> Language -> Bool # (/=) :: Language -> Language -> Bool #
Show Language # |
Methods showsPrec :: Int -> Language -> ShowS Source # show :: Language -> String Source # showList :: [Language] -> ShowS Source #
Outputable Language # |
Methods ppr :: Language -> SDoc # pprPrec :: Rational -> Language -> SDoc #

data PlatformConstants #

Constructors

PlatformConstants |

Fields

- pc_platformConstants :: ()
- pc_CONTROL_GROUP_CONST_291 :: Int
- pc_STD_HDR_SIZE :: Int
- pc_PROF_HDR_SIZE :: Int
- pc_BLOCK_SIZE :: Int
- pc_BLOCKS_PER_MBLOCK :: Int
- pc_TICKY_BIN_COUNT :: Int
- pc_OFFSET_StgRegTable_rR1 :: Int
- pc_OFFSET_StgRegTable_rR2 :: Int
- pc_OFFSET_StgRegTable_rR3 :: Int
- pc_OFFSET_StgRegTable_rR4 :: Int
- pc_OFFSET_StgRegTable_rR5 :: Int
- pc_OFFSET_StgRegTable_rR6 :: Int
- pc_OFFSET_StgRegTable_rR7 :: Int
- pc_OFFSET_StgRegTable_rR8 :: Int
- pc_OFFSET_StgRegTable_rR9 :: Int
- pc_OFFSET_StgRegTable_rR10 :: Int
- pc_OFFSET_StgRegTable_rF1 :: Int
- pc_OFFSET_StgRegTable_rF2 :: Int
- pc_OFFSET_StgRegTable_rF3 :: Int
- pc_OFFSET_StgRegTable_rF4 :: Int
- pc_OFFSET_StgRegTable_rF5 :: Int
- pc_OFFSET_StgRegTable_rF6 :: Int
- pc_OFFSET_StgRegTable_rD1 :: Int
- pc_OFFSET_StgRegTable_rD2 :: Int
- pc_OFFSET_StgRegTable_rD3 :: Int
- pc_OFFSET_StgRegTable_rD4 :: Int
- pc_OFFSET_StgRegTable_rD5 :: Int
- pc_OFFSET_StgRegTable_rD6 :: Int
- pc_OFFSET_StgRegTable_rXMM1 :: Int
- pc_OFFSET_StgRegTable_rXMM2 :: Int
- pc_OFFSET_StgRegTable_rXMM3 :: Int
- pc_OFFSET_StgRegTable_rXMM4 :: Int
- pc_OFFSET_StgRegTable_rXMM5 :: Int
- pc_OFFSET_StgRegTable_rXMM6 :: Int
- pc_OFFSET_StgRegTable_rYMM1 :: Int
- pc_OFFSET_StgRegTable_rYMM2 :: Int
- pc_OFFSET_StgRegTable_rYMM3 :: Int
- pc_OFFSET_StgRegTable_rYMM4 :: Int
- pc_OFFSET_StgRegTable_rYMM5 :: Int
- pc_OFFSET_StgRegTable_rYMM6 :: Int
- pc_OFFSET_StgRegTable_rZMM1 :: Int
- pc_OFFSET_StgRegTable_rZMM2 :: Int
- pc_OFFSET_StgRegTable_rZMM3 :: Int
- pc_OFFSET_StgRegTable_rZMM4 :: Int
- pc_OFFSET_StgRegTable_rZMM5 :: Int
- pc_OFFSET_StgRegTable_rZMM6 :: Int
- pc_OFFSET_StgRegTable_rL1 :: Int
- pc_OFFSET_StgRegTable_rSp :: Int
- pc_OFFSET_StgRegTable_rSpLim :: Int
- pc_OFFSET_StgRegTable_rHp :: Int
- pc_OFFSET_StgRegTable_rHpLim :: Int
- pc_OFFSET_StgRegTable_rCCCS :: Int
- pc_OFFSET_StgRegTable_rCurrentTSO :: Int
- pc_OFFSET_StgRegTable_rCurrentNursery :: Int
- pc_OFFSET_StgRegTable_rHpAlloc :: Int
- pc_OFFSET_stgEagerBlackholeInfo :: Int
- pc_OFFSET_stgGCEnter1 :: Int
- pc_OFFSET_stgGCFun :: Int
- pc_OFFSET_Capability_r :: Int
- pc_OFFSET_bdescr_start :: Int
- pc_OFFSET_bdescr_free :: Int
- pc_OFFSET_bdescr_blocks :: Int
- pc_OFFSET_bdescr_flags :: Int
- pc_SIZEOF_CostCentreStack :: Int
- pc_OFFSET_CostCentreStack_mem_alloc :: Int
- pc_REP_CostCentreStack_mem_alloc :: Int
- pc_OFFSET_CostCentreStack_scc_count :: Int
- pc_REP_CostCentreStack_scc_count :: Int
- pc_OFFSET_StgHeader_ccs :: Int
- pc_OFFSET_StgHeader_ldvw :: Int
- pc_SIZEOF_StgSMPThunkHeader :: Int
- pc_OFFSET_StgEntCounter_allocs :: Int
- pc_REP_StgEntCounter_allocs :: Int
- pc_OFFSET_StgEntCounter_allocd :: Int
- pc_REP_StgEntCounter_allocd :: Int
- pc_OFFSET_StgEntCounter_registeredp :: Int
- pc_OFFSET_StgEntCounter_link :: Int
- pc_OFFSET_StgEntCounter_entry_count :: Int
- pc_SIZEOF_StgUpdateFrame_NoHdr :: Int
- pc_SIZEOF_StgMutArrPtrs_NoHdr :: Int
- pc_OFFSET_StgMutArrPtrs_ptrs :: Int
- pc_OFFSET_StgMutArrPtrs_size :: Int
- pc_SIZEOF_StgSmallMutArrPtrs_NoHdr :: Int
- pc_OFFSET_StgSmallMutArrPtrs_ptrs :: Int
- pc_SIZEOF_StgArrBytes_NoHdr :: Int
- pc_OFFSET_StgArrBytes_bytes :: Int
- pc_OFFSET_StgTSO_alloc_limit :: Int
- pc_OFFSET_StgTSO_cccs :: Int
- pc_OFFSET_StgTSO_stackobj :: Int
- pc_OFFSET_StgStack_sp :: Int
- pc_OFFSET_StgStack_stack :: Int
- pc_OFFSET_StgUpdateFrame_updatee :: Int
- pc_OFFSET_StgFunInfoExtraFwd_arity :: Int
- pc_REP_StgFunInfoExtraFwd_arity :: Int
- pc_SIZEOF_StgFunInfoExtraRev :: Int
- pc_OFFSET_StgFunInfoExtraRev_arity :: Int
- pc_REP_StgFunInfoExtraRev_arity :: Int
- pc_MAX_SPEC_SELECTEE_SIZE :: Int
- pc_MAX_SPEC_AP_SIZE :: Int
- pc_MIN_PAYLOAD_SIZE :: Int
- pc_MIN_INTLIKE :: Int
- pc_MAX_INTLIKE :: Int
- pc_MIN_CHARLIKE :: Int
- pc_MAX_CHARLIKE :: Int
- pc_MUT_ARR_PTRS_CARD_BITS :: Int
- pc_MAX_Vanilla_REG :: Int
- pc_MAX_Float_REG :: Int
- pc_MAX_Double_REG :: Int
- pc_MAX_Long_REG :: Int
- pc_MAX_XMM_REG :: Int
- pc_MAX_Real_Vanilla_REG :: Int
- pc_MAX_Real_Float_REG :: Int
- pc_MAX_Real_Double_REG :: Int
- pc_MAX_Real_XMM_REG :: Int
- pc_MAX_Real_Long_REG :: Int
- pc_RESERVED_C_STACK_BYTES :: Int
- pc_RESERVED_STACK_WORDS :: Int
- pc_AP_STACK_SPLIM :: Int
- pc_WORD_SIZE :: Int
- pc_DOUBLE_SIZE :: Int
- pc_CINT_SIZE :: Int
- pc_CLONG_SIZE :: Int
- pc_CLONG_LONG_SIZE :: Int
- pc_BITMAP_BITS_SHIFT :: Int
- pc_TAG_BITS :: Int
- pc_WORDS_BIGENDIAN :: Bool
- pc_DYNAMIC_BY_DEFAULT :: Bool
- pc_LDV_SHIFT :: Int
- pc_ILDV_CREATE_MASK :: Integer
- pc_ILDV_STATE_CREATE :: Integer
- pc_ILDV_STATE_USE :: Integer

Instances

Read PlatformConstants # |
Methods readsPrec :: Int -> ReadS PlatformConstants Source # readList :: ReadS [PlatformConstants] Source # readPrec :: ReadPrec PlatformConstants Source # readListPrec :: ReadPrec [PlatformConstants] Source #

type FatalMessager = String -> IO () #

type LogAction = DynFlags -> WarnReason -> Severity -> SrcSpan -> PprStyle -> MsgDoc -> IO () #

type LogFinaliser = DynFlags -> IO () #

newtype FlushOut #

Constructors

FlushOut (IO ()) |

newtype FlushErr #

Constructors

FlushErr (IO ()) |

data ProfAuto #

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

Enum ProfAuto # |
Methods succ :: ProfAuto -> ProfAuto Source # pred :: ProfAuto -> ProfAuto Source # toEnum :: Int -> ProfAuto Source # fromEnum :: ProfAuto -> Int Source # enumFrom :: ProfAuto -> [ProfAuto] Source # enumFromThen :: ProfAuto -> ProfAuto -> [ProfAuto] Source # enumFromTo :: ProfAuto -> ProfAuto -> [ProfAuto] Source # enumFromThenTo :: ProfAuto -> ProfAuto -> ProfAuto -> [ProfAuto] Source #
Eq ProfAuto # |
Methods (==) :: ProfAuto -> ProfAuto -> Bool # (/=) :: ProfAuto -> ProfAuto -> Bool #

glasgowExtsFlags :: [Extension] #

warningGroups :: [(String, [WarningFlag])] #

Warning groups.

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

warningHierarchies :: [[String]] #

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.

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

gopt_set :: DynFlags -> GeneralFlag -> DynFlags #

Set a `GeneralFlag`

gopt_unset :: DynFlags -> GeneralFlag -> DynFlags #

Unset a `GeneralFlag`

setGeneralFlag' :: GeneralFlag -> DynFlags -> DynFlags #

unSetGeneralFlag' :: GeneralFlag -> DynFlags -> DynFlags #

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

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`

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

useUnicodeSyntax :: DynFlags -> Bool #

An internal helper to check whether to use unicode syntax for output.

Note: You should very likely be using `unicodeSyntax` instead of this function.

whenGeneratingDynamicToo :: MonadIO m => DynFlags -> m () -> m () #

ifGeneratingDynamicToo :: MonadIO m => DynFlags -> m a -> m a -> m a #

whenCannotGenerateDynamicToo :: MonadIO m => DynFlags -> m () -> m () #

dynamicTooMkDynamicDynFlags :: DynFlags -> DynFlags #

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
- hscTarget :: HscTarget
- settings :: Settings
- verbosity :: Int

  Verbosity level: see Note [Verbosity levels]

- optLevel :: Int

  Optimisation level

- debugLevel :: Int

  How much debug information to produce

- simplPhases :: Int

  Number of simplifier phases

- maxSimplIterations :: Int

  Max simplifier iterations

- maxPmCheckIterations :: Int

  Max no iterations for pm checking

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

  Additional demand analysis

- parMakeCount :: Maybe Int

  The number of modules to compile in parallel in --make mode, where Nothing ==> compile as many in parallel as there are CPUs.

- 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

- maxUncoveredPatterns :: Int

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

- simplTickFactor :: Int

  Multiplier for simplifier ticks

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

- liberateCaseThreshold :: Maybe Int

  Threshold for LiberateCase

- floatLamArgs :: Maybe Int

  Arg count for lambda floating See CoreMonad.FloatOutSwitches

- historySize :: Int

  Simplification history size

- importPaths :: [FilePath]
- mainModIs :: Module
- mainFunIs :: Maybe String
- reductionDepth :: IntWithInf

  Typechecker maximum stack depth

- solverIterations :: IntWithInf

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

- thisInstalledUnitId :: InstalledUnitId
- thisComponentId_ :: Maybe ComponentId
- thisUnitIdInsts_ :: Maybe [(ModuleName, Module)]
- ways :: [Way]

  Way flags from the command line

- buildTag :: String

  The global "way" (e.g. "p" for prof)

- rtsBuildTag :: String

  The RTS "way"

- splitInfo :: Maybe (String, Int)
- objectDir :: Maybe String
- dylibInstallName :: Maybe String
- hiDir :: Maybe String
- stubDir :: Maybe String
- dumpDir :: Maybe String
- objectSuf :: String
- hcSuf :: String
- hiSuf :: String
- canGenerateDynamicToo :: IORef Bool
- dynObjectSuf :: String
- dynHiSuf :: String
- dllSplitFile :: Maybe FilePath
- dllSplit :: Maybe [Set String]
- outputFile :: Maybe String
- dynOutputFile :: Maybe String
- outputHi :: Maybe String
- dynLibLoader :: DynLibLoader
- dumpPrefix :: Maybe FilePath

  This is set by `runPipeline` based on where its output is going.

- dumpPrefixForce :: Maybe FilePath

  Override the `dumpPrefix` set by `runPipeline`. Set by `-ddump-file-prefix`

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

  Path to store the .mix files

- pluginModNames :: [ModuleName]
- 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.

- hooks :: Hooks
- depMakefile :: FilePath
- depIncludePkgDeps :: 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 `getPackageConfRefs`.

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

- pkgDatabase :: Maybe [(FilePath, [PackageConfig])]
- pkgState :: PackageState
- filesToClean :: IORef [FilePath]
- dirsToClean :: IORef (Map FilePath FilePath)
- filesToNotIntermediateClean :: IORef [FilePath]
- nextTempSuffix :: IORef Int
- generatedDumps :: IORef (Set FilePath)
- dumpFlags :: IntSet
- generalFlags :: IntSet
- warningFlags :: IntSet
- fatalWarningFlags :: IntSet
- language :: Maybe Language
- safeHaskell :: SafeHaskellMode

  Safe Haskell mode

- safeInfer :: Bool
- safeInferred :: Bool
- thOnLoc :: SrcSpan
- newDerivOnLoc :: SrcSpan
- overlapInstLoc :: SrcSpan
- incoherentOnLoc :: SrcSpan
- pkgTrustOnLoc :: SrcSpan
- warnSafeOnLoc :: SrcSpan
- warnUnsafeOnLoc :: SrcSpan
- trustworthyOnLoc :: SrcSpan
- extensions :: [OnOff Extension]
- extensionFlags :: IntSet
- ufCreationThreshold :: Int
- ufUseThreshold :: Int
- ufFunAppDiscount :: Int
- ufDictDiscount :: Int
- ufKeenessFactor :: Float
- ufDearOp :: Int
- ufVeryAggressive :: Bool
- maxWorkerArgs :: Int
- ghciHistSize :: Int
- initLogAction :: IO (Maybe LogOutput)

  MsgDoc output action: use ErrUtils instead of this if you can

- log_action :: LogAction
- log_finaliser :: LogFinaliser
- flushOut :: FlushOut
- flushErr :: FlushErr
- haddockOptions :: Maybe String
- ghciScripts :: [String]

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

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

  what kind of {--} to add automatically

- interactivePrint :: Maybe String
- nextWrapperNum :: IORef (ModuleEnv Int)
- sseVersion :: Maybe SseVersion

  Machine dependent flags (-mblah stuff)

- avx :: Bool
- avx2 :: Bool
- avx512cd :: Bool
- avx512er :: Bool
- avx512f :: Bool
- avx512pf :: Bool
- rtldInfo :: IORef (Maybe LinkerInfo)

  Run-time linker information (what options we need, etc.)

- rtccInfo :: IORef (Maybe CompilerInfo)

  Run-time compiler information

- 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 :: Int

  Unique supply configuration for testing build determinism

- uniqueIncrement :: Int

data FlagSpec flag #

Constructors

FlagSpec |

Fields

- flagSpecName :: String

  Flag in string form

- flagSpecFlag :: flag

  Flag in internal form

- flagSpecAction :: TurnOnFlag -> DynP ()

  Extra action to run when the flag is found Typically, emit a warning or error

- flagSpecGhcMode :: GhcFlagMode

  In which ghc mode the flag has effect

class HasDynFlags m where #

Minimal complete definition

getDynFlags

Methods

getDynFlags :: m DynFlags #

Instances

HasDynFlags PD # |
Methods getDynFlags :: PD DynFlags #
HasDynFlags LlvmM # |
Methods getDynFlags :: LlvmM DynFlags #
HasDynFlags FCode # |
Methods getDynFlags :: FCode DynFlags #
HasDynFlags CmmParse # |
Methods getDynFlags :: CmmParse DynFlags #
HasDynFlags Hsc # |
Methods getDynFlags :: Hsc DynFlags #
HasDynFlags CompPipeline # |
Methods getDynFlags :: CompPipeline DynFlags #
HasDynFlags Ghc # |
Methods getDynFlags :: Ghc DynFlags #
HasDynFlags CoreM # |
Methods getDynFlags :: CoreM DynFlags #
HasDynFlags SimplM # |
Methods getDynFlags :: SimplM DynFlags #
HasDynFlags TcS # |
Methods getDynFlags :: TcS DynFlags #
HasDynFlags VM # |
Methods getDynFlags :: VM DynFlags #
HasDynFlags NatM # |
Methods getDynFlags :: NatM DynFlags #
(Monad m, HasDynFlags m) => HasDynFlags (MaybeT m) # |
Methods getDynFlags :: MaybeT m DynFlags #
ContainsDynFlags env => HasDynFlags (IOEnv env) # |
Methods getDynFlags :: IOEnv env DynFlags #
HasDynFlags (RegM a) # |
Methods getDynFlags :: RegM a DynFlags #
MonadIO m => HasDynFlags (GhcT m) # |
Methods getDynFlags :: GhcT m DynFlags #
(Monoid a, Monad m, HasDynFlags m) => HasDynFlags (WriterT a m) # |
Methods getDynFlags :: WriterT a m DynFlags #
(Monad m, HasDynFlags m) => HasDynFlags (ExceptT e m) # |
Methods getDynFlags :: ExceptT e m DynFlags #
(Monad m, HasDynFlags m) => HasDynFlags (ReaderT * a m) # |
Methods getDynFlags :: ReaderT * a m DynFlags #

class ContainsDynFlags t where #

Minimal complete definition

extractDynFlags

Methods

extractDynFlags :: t -> DynFlags #

Instances

ContainsDynFlags (Env gbl lcl) # |
Methods extractDynFlags :: Env gbl lcl -> DynFlags #

data RtsOptsEnabled #

Constructors

RtsOptsNone |
RtsOptsSafeOnly |
RtsOptsAll |

Instances

Show RtsOptsEnabled # |
Methods showsPrec :: Int -> RtsOptsEnabled -> ShowS Source # show :: RtsOptsEnabled -> String Source # showList :: [RtsOptsEnabled] -> ShowS Source #

data HscTarget #

The target code type of the compilation (if any).

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

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

- If a program uses Template Haskell the typechecker may try to run code from an imported module. This will fail if no code has been generated for this module. You can use `needsTemplateHaskell` to detect whether this might be the case and choose to either switch to a different target or avoid typechecking such modules. (The latter may be preferable for security reasons.)

Constructors

HscC | Generate C code.
HscAsm | Generate assembly using the native code generator.
HscLlvm | Generate assembly using the llvm code generator.
HscInterpreted | Generate bytecode. (Requires `LinkInMemory`)
HscNothing | Don't generate any code. See notes above.

Instances

Eq HscTarget # |
Methods (==) :: HscTarget -> HscTarget -> Bool # (/=) :: HscTarget -> HscTarget -> Bool #
Show HscTarget # |
Methods showsPrec :: Int -> HscTarget -> ShowS Source # show :: HscTarget -> String Source # showList :: [HscTarget] -> ShowS Source #

isObjectTarget :: HscTarget -> Bool #

Will this target result in an object file on the disk?

defaultObjectTarget :: Platform -> HscTarget #

The `HscTarget` value corresponding to the default way to create object files on the current platform.

targetRetainsAllBindings :: HscTarget -> Bool #

Does this target retain *all* top-level bindings for a module, rather than just the exported bindings, in the TypeEnv and compiled code (if any)? In interpreted mode we do this, so that GHCi can call functions inside a module. In HscNothing mode we also do it, so that Haddock can get access to the GlobalRdrEnv for a module after typechecking it.

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 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 Finder for why we need this

Instances

Eq GhcMode # |
Methods (==) :: GhcMode -> GhcMode -> Bool # (/=) :: GhcMode -> GhcMode -> Bool #
Outputable GhcMode # |
Methods ppr :: GhcMode -> SDoc # pprPrec :: Rational -> GhcMode -> SDoc #

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

Instances

Eq GhcLink # |
Methods (==) :: GhcLink -> GhcLink -> Bool # (/=) :: GhcLink -> GhcLink -> Bool #
Show GhcLink # |
Methods showsPrec :: Int -> GhcLink -> ShowS Source # show :: GhcLink -> String Source # showList :: [GhcLink] -> ShowS Source #

isNoLink :: GhcLink -> Bool #

data PackageFlag #

Flags for manipulating packages visibility.

Constructors

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

HidePackage String

    -hide-package

Instances

Eq PackageFlag # |
Methods (==) :: PackageFlag -> PackageFlag -> Bool # (/=) :: PackageFlag -> PackageFlag -> Bool #
Outputable PackageFlag # |
Methods ppr :: PackageFlag -> SDoc # pprPrec :: Rational -> PackageFlag -> SDoc #

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 UnitId | `-package-id`, by `UnitId`

Instances

Eq PackageArg # |
Methods (==) :: PackageArg -> PackageArg -> Bool # (/=) :: PackageArg -> PackageArg -> Bool #
Show PackageArg # |
Methods showsPrec :: Int -> PackageArg -> ShowS Source # show :: PackageArg -> String Source # showList :: [PackageArg] -> ShowS Source #
Outputable PackageArg # |
Methods ppr :: PackageArg -> SDoc # pprPrec :: Rational -> PackageArg -> SDoc #

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

Eq ModRenaming # |
Methods (==) :: ModRenaming -> ModRenaming -> Bool # (/=) :: ModRenaming -> ModRenaming -> Bool #
Outputable ModRenaming # |
Methods ppr :: ModRenaming -> SDoc # pprPrec :: Rational -> ModRenaming -> SDoc #

packageFlagsChanged :: DynFlags -> DynFlags -> Bool #

newtype IgnorePackageFlag #

Flags for manipulating the set of non-broken packages.

Constructors

IgnorePackage String

    -ignore-package

Instances

Eq IgnorePackageFlag # |
Methods (==) :: IgnorePackageFlag -> IgnorePackageFlag -> Bool # (/=) :: IgnorePackageFlag -> IgnorePackageFlag -> Bool #

data TrustFlag #

Flags for manipulating package trust.

Constructors

TrustPackage String

    -trust

DistrustPackage String

    -distrust

Instances

Eq TrustFlag # |
Methods (==) :: TrustFlag -> TrustFlag -> Bool # (/=) :: TrustFlag -> TrustFlag -> Bool #

data PackageDBFlag #

Constructors

PackageDB PkgConfRef |
NoUserPackageDB |
NoGlobalPackageDB |
ClearPackageDBs |

Instances

Eq PackageDBFlag # |
Methods (==) :: PackageDBFlag -> PackageDBFlag -> Bool # (/=) :: PackageDBFlag -> PackageDBFlag -> Bool #

data PkgConfRef #

Constructors

GlobalPkgConf |
UserPkgConf |
PkgConfFile FilePath |

Instances

Eq PkgConfRef # |
Methods (==) :: PkgConfRef -> PkgConfRef -> Bool # (/=) :: PkgConfRef -> PkgConfRef -> 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

Eq Option # |
Methods (==) :: Option -> Option -> Bool # (/=) :: Option -> Option -> Bool #

showOpt :: Option -> String #

data DynLibLoader #

Constructors

Deployable |
SystemDependent |

Instances

Eq DynLibLoader # |
Methods (==) :: DynLibLoader -> DynLibLoader -> Bool # (/=) :: DynLibLoader -> DynLibLoader -> Bool #

fFlags :: [FlagSpec GeneralFlag] #

These `-f<blah>` flags can all be reversed with `-fno-<blah>`

fLangFlags :: [FlagSpec Extension] #

These `-f<blah>` flags can all be reversed with `-fno-<blah>`

xFlags :: [FlagSpec Extension] #

These -Xblah flags can all be reversed with -XNoblah

wWarningFlags :: [FlagSpec WarningFlag] #

These `-W<blah>` flags can all be reversed with `-Wno-<blah>`

dynFlagDependencies :: DynFlags -> [ModuleName] #

Some modules have dependencies on others through the DynFlags rather than textual imports

tablesNextToCode :: DynFlags -> Bool #

mkTablesNextToCode :: Bool -> Bool #

makeDynFlagsConsistent :: DynFlags -> (DynFlags, [Located String]) #

Resolve any internal inconsistencies in a set of `DynFlags`. Returns the consistent `DynFlags` as well as a list of warnings to report to the user.

shouldUseColor :: DynFlags -> Bool #

positionIndependent :: DynFlags -> Bool #

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

data Way #

Constructors

WayCustom String |
WayThreaded |
WayDebug |
WayProf |
WayEventLog |
WayDyn |

Instances

Eq Way # |
Methods (==) :: Way -> Way -> Bool # (/=) :: Way -> Way -> Bool #
Ord Way # |
Methods compare :: Way -> Way -> Ordering # (<) :: Way -> Way -> Bool # (<=) :: Way -> Way -> Bool # (>) :: Way -> Way -> Bool # (>=) :: Way -> Way -> Bool # max :: Way -> Way -> Way # min :: Way -> Way -> Way #
Show Way # |
Methods showsPrec :: Int -> Way -> ShowS Source # show :: Way -> String Source # showList :: [Way] -> ShowS Source #

mkBuildTag :: [Way] -> String #

wayRTSOnly :: Way -> Bool #

addWay' :: Way -> DynFlags -> DynFlags #

updateWays :: DynFlags -> DynFlags #

wayGeneralFlags :: Platform -> Way -> [GeneralFlag] #

wayUnsetGeneralFlags :: Platform -> Way -> [GeneralFlag] #

thisPackage :: DynFlags -> UnitId #

thisComponentId :: DynFlags -> ComponentId #

thisUnitIdInsts :: DynFlags -> [(ModuleName, Module)] #

## Log output

putLogMsg :: DynFlags -> WarnReason -> Severity -> SrcSpan -> PprStyle -> MsgDoc -> IO () #

Write an error or warning to the `LogOutput`.

## Safe Haskell

data SafeHaskellMode #

The various Safe Haskell modes

Constructors

Sf_None |
Sf_Unsafe |
Sf_Trustworthy |
Sf_Safe |

Instances

Eq SafeHaskellMode # |
Methods (==) :: SafeHaskellMode -> SafeHaskellMode -> Bool # (/=) :: SafeHaskellMode -> SafeHaskellMode -> Bool #
Show SafeHaskellMode # |
Methods showsPrec :: Int -> SafeHaskellMode -> ShowS Source # show :: SafeHaskellMode -> String Source # showList :: [SafeHaskellMode] -> ShowS Source #
Outputable SafeHaskellMode # |
Methods ppr :: SafeHaskellMode -> SDoc # pprPrec :: Rational -> SafeHaskellMode -> SDoc #

safeHaskellOn :: DynFlags -> Bool #

Is Safe Haskell on in some way (including inference mode)

safeImportsOn :: DynFlags -> Bool #

Test if Safe Imports are on in some form

safeLanguageOn :: DynFlags -> Bool #

Is the Safe Haskell safe language in use

safeInferOn :: DynFlags -> Bool #

Is the Safe Haskell safe inference mode active

packageTrustOn :: DynFlags -> Bool #

Is the -fpackage-trust mode on

safeDirectImpsReq :: DynFlags -> Bool #

Are all direct imports required to be safe for this Safe Haskell mode? Direct imports are when the code explicitly imports a module

safeImplicitImpsReq :: DynFlags -> Bool #

Are all implicit imports required to be safe for this Safe Haskell mode? Implicit imports are things in the prelude. e.g System.IO when print is used.

unsafeFlags :: [(String, DynFlags -> SrcSpan, DynFlags -> Bool, DynFlags -> DynFlags)] #

A list of unsafe flags under Safe Haskell. Tuple elements are: * name of the flag * function to get srcspan that enabled the flag * function to test if the flag is on * function to turn the flag off

unsafeFlagsForInfer :: [(String, DynFlags -> SrcSpan, DynFlags -> Bool, DynFlags -> DynFlags)] #

A list of unsafe flags under Safe Haskell. Tuple elements are: * name of the flag * function to get srcspan that enabled the flag * function to test if the flag is on * function to turn the flag off

## System tool settings and locations

data Settings #

Constructors

Settings |

Fields

- sTargetPlatform :: Platform
- sGhcUsagePath :: FilePath
- sGhciUsagePath :: FilePath
- sTopDir :: FilePath
- sTmpDir :: String
- sProgramName :: String
- sProjectVersion :: String
- sRawSettings :: [(String, String)]
- sExtraGccViaCFlags :: [String]
- sSystemPackageConfig :: FilePath
- sLdSupportsCompactUnwind :: Bool
- sLdSupportsBuildId :: Bool
- sLdSupportsFilelist :: Bool
- sLdIsGnuLd :: Bool
- sGccSupportsNoPie :: Bool
- sPgm_L :: String
- sPgm_P :: (String, [Option])
- sPgm_F :: String
- sPgm_c :: (String, [Option])
- sPgm_s :: (String, [Option])
- sPgm_a :: (String, [Option])
- sPgm_l :: (String, [Option])
- sPgm_dll :: (String, [Option])
- sPgm_T :: String
- sPgm_windres :: String
- sPgm_libtool :: String
- sPgm_lo :: (String, [Option])
- sPgm_lc :: (String, [Option])
- sPgm_i :: String
- sOpt_L :: [String]
- sOpt_P :: [String]
- sOpt_F :: [String]
- sOpt_c :: [String]
- sOpt_a :: [String]
- sOpt_l :: [String]
- sOpt_windres :: [String]
- sOpt_lo :: [String]
- sOpt_lc :: [String]
- sOpt_i :: [String]
- sPlatformConstants :: PlatformConstants

targetPlatform :: DynFlags -> Platform #

programName :: DynFlags -> String #

projectVersion :: DynFlags -> String #

ghcUsagePath :: DynFlags -> FilePath #

ghciUsagePath :: DynFlags -> FilePath #

topDir :: DynFlags -> FilePath #

tmpDir :: DynFlags -> String #

rawSettings :: DynFlags -> [(String, String)] #

versionedAppDir :: DynFlags -> MaybeT IO FilePath #

The directory for this version of ghc in the user's app directory (typically something like `~.ghcx86_64-linux-7.6.3`)

extraGccViaCFlags :: DynFlags -> [String] #

systemPackageConfig :: DynFlags -> FilePath #

pgm_L :: DynFlags -> String #

pgm_P :: DynFlags -> (String, [Option]) #

pgm_F :: DynFlags -> String #

pgm_c :: DynFlags -> (String, [Option]) #

pgm_s :: DynFlags -> (String, [Option]) #

pgm_a :: DynFlags -> (String, [Option]) #

pgm_l :: DynFlags -> (String, [Option]) #

pgm_dll :: DynFlags -> (String, [Option]) #

pgm_T :: DynFlags -> String #

pgm_windres :: DynFlags -> String #

pgm_libtool :: DynFlags -> String #

pgm_lo :: DynFlags -> (String, [Option]) #

pgm_lc :: DynFlags -> (String, [Option]) #

pgm_i :: DynFlags -> String #

opt_L :: DynFlags -> [String] #

opt_P :: DynFlags -> [String] #

opt_F :: DynFlags -> [String] #

opt_c :: DynFlags -> [String] #

opt_a :: DynFlags -> [String] #

opt_l :: DynFlags -> [String] #

opt_i :: DynFlags -> [String] #

opt_windres :: DynFlags -> [String] #

opt_lo :: DynFlags -> [String] #

opt_lc :: DynFlags -> [String] #

## 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.

defaultWays :: Settings -> [Way] #

interpWays :: [Way] #

interpreterProfiled :: DynFlags -> Bool #

interpreterDynamic :: DynFlags -> Bool #

initDynFlags :: DynFlags -> IO DynFlags #

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

defaultFatalMessager :: FatalMessager #

defaultLogAction :: LogAction #

defaultLogActionHPrintDoc :: DynFlags -> Handle -> SDoc -> PprStyle -> IO () #

Like `defaultLogActionHPutStrDoc` but appends an extra newline.

defaultLogActionHPutStrDoc :: DynFlags -> Handle -> SDoc -> PprStyle -> IO () #

defaultFlushOut :: FlushOut #

defaultFlushErr :: FlushErr #

getOpts #

Arguments

:: DynFlags | `DynFlags` to retrieve the options from
-> (DynFlags -> [a]) | Relevant record accessor: one of the `opt_*` accessors
-> [a] | Correctly ordered extracted options

Retrieve the options corresponding to a particular `opt_*` field in the correct order

getVerbFlags :: DynFlags -> [String] #

Gets the verbosity flag for the current verbosity level. This is fed to other tools, so GHC-specific verbosity flags like `-ddump-most` are not included

updOptLevel :: Int -> DynFlags -> DynFlags #

Sets the `DynFlags` to be appropriate to the optimisation level

setTmpDir :: FilePath -> DynFlags -> DynFlags #

setUnitId :: String -> DynFlags -> DynFlags #

interpretPackageEnv :: DynFlags -> IO DynFlags #

Find the package environment (if one exists)

We interpret the package environment as a set of package flags; to be specific, if we find a package environment file like

    clear-package-db
    global-package-db
    package-db blah/package.conf.d
    package-id id1
    package-id id2

we interpret this as

    [ -hide-all-packages
    , -clear-package-db
    , -global-package-db
    , -package-db blah/package.conf.d
    , -package-id id1
    , -package-id id2
    ]

There's also an older syntax alias for package-id, which is just an unadorned package id

    id1
    id2

canonicalizeHomeModule :: DynFlags -> ModuleName -> Module #

Given a `ModuleName` of a signature in the home library, find out how it is instantiated. E.g., the canonical form of A in `p[A=q[]:A]` is `q[]:A`.

## Parsing DynFlags

parseDynamicFlagsCmdLine #

Arguments

:: MonadIO m |
=> DynFlags |
-> [Located String] |
-> m (DynFlags, [Located String], [Located String]) | Updated `DynFlags`, left-over arguments, and list of warnings.

Parse dynamic flags from a list of command line arguments. Returns the the parsed `DynFlags`, the left-over arguments, and a list of warnings. Throws a `UsageError` if errors occurred during parsing (such as unknown flags or missing arguments).

parseDynamicFilePragma #

Arguments

:: MonadIO m |
=> DynFlags |
-> [Located String] |
-> m (DynFlags, [Located String], [Located String]) | Updated `DynFlags`, left-over arguments, and list of warnings.

Like `parseDynamicFlagsCmdLine` but does not allow the package flags (-package, -hide-package, -ignore-package, -hide-all-packages, -package-db). Used to parse flags set in a modules pragma.

parseDynamicFlagsFull #

Arguments

:: MonadIO m |
=> [Flag (CmdLineP DynFlags)] | valid flags to match against
-> Bool | are the arguments from the command line?
-> DynFlags | current dynamic flags
-> [Located String] | arguments to parse
-> m (DynFlags, [Located String], [Located String]) |

Parses the dynamically set flags for GHC. This is the most general form of the dynamic flag parser that the other methods simply wrap. It allows saying which flags are valid flags and indicating if we are parsing arguments from the command line or from a file pragma.

## Available DynFlags

allNonDeprecatedFlags :: [String] #

All dynamic flags option strings without the deprecated ones. These are the user facing strings for enabling and disabling options.

flagsAll :: [Flag (CmdLineP DynFlags)] #

flagsDynamic :: [Flag (CmdLineP DynFlags)] #

flagsPackage :: [Flag (CmdLineP DynFlags)] #

flagsForCompletion :: Bool -> [String] #

Make a list of flags for shell completion. Filter all available flags into two groups, for interactive GHC vs all other.

supportedLanguagesAndExtensions :: [String] #

languageExtensions :: Maybe Language -> [Extension] #

## DynFlags C compiler options

picCCOpts :: DynFlags -> [String] #

picPOpts :: DynFlags -> [String] #

# Compiler configuration suitable for display to the user

compilerInfo :: DynFlags -> [(String, String)] #

rtsIsProfiled :: Bool #

Was the runtime system built with profiling enabled?

dynamicGhc :: Bool #

cONTROL_GROUP_CONST_291 :: DynFlags -> Int #

sTD_HDR_SIZE :: DynFlags -> Int #

pROF_HDR_SIZE :: DynFlags -> Int #

bLOCK_SIZE :: DynFlags -> Int #

bLOCKS_PER_MBLOCK :: DynFlags -> Int #

tICKY_BIN_COUNT :: DynFlags -> Int #

oFFSET_StgRegTable_rR1 :: DynFlags -> Int #

oFFSET_StgRegTable_rR2 :: DynFlags -> Int #

oFFSET_StgRegTable_rR3 :: DynFlags -> Int #

oFFSET_StgRegTable_rR4 :: DynFlags -> Int #

oFFSET_StgRegTable_rR5 :: DynFlags -> Int #

oFFSET_StgRegTable_rR6 :: DynFlags -> Int #

oFFSET_StgRegTable_rR7 :: DynFlags -> Int #

oFFSET_StgRegTable_rR8 :: DynFlags -> Int #

oFFSET_StgRegTable_rR9 :: DynFlags -> Int #

oFFSET_StgRegTable_rR10 :: DynFlags -> Int #

oFFSET_StgRegTable_rF1 :: DynFlags -> Int #

oFFSET_StgRegTable_rF2 :: DynFlags -> Int #

oFFSET_StgRegTable_rF3 :: DynFlags -> Int #

oFFSET_StgRegTable_rF4 :: DynFlags -> Int #

oFFSET_StgRegTable_rF5 :: DynFlags -> Int #

oFFSET_StgRegTable_rF6 :: DynFlags -> Int #

oFFSET_StgRegTable_rD1 :: DynFlags -> Int #

oFFSET_StgRegTable_rD2 :: DynFlags -> Int #

oFFSET_StgRegTable_rD3 :: DynFlags -> Int #

oFFSET_StgRegTable_rD4 :: DynFlags -> Int #

oFFSET_StgRegTable_rD5 :: DynFlags -> Int #

oFFSET_StgRegTable_rD6 :: DynFlags -> Int #

oFFSET_StgRegTable_rXMM1 :: DynFlags -> Int #

oFFSET_StgRegTable_rXMM2 :: DynFlags -> Int #

oFFSET_StgRegTable_rXMM3 :: DynFlags -> Int #

oFFSET_StgRegTable_rXMM4 :: DynFlags -> Int #

oFFSET_StgRegTable_rXMM5 :: DynFlags -> Int #

oFFSET_StgRegTable_rXMM6 :: DynFlags -> Int #

oFFSET_StgRegTable_rYMM1 :: DynFlags -> Int #

oFFSET_StgRegTable_rYMM2 :: DynFlags -> Int #

oFFSET_StgRegTable_rYMM3 :: DynFlags -> Int #

oFFSET_StgRegTable_rYMM4 :: DynFlags -> Int #

oFFSET_StgRegTable_rYMM5 :: DynFlags -> Int #

oFFSET_StgRegTable_rYMM6 :: DynFlags -> Int #

oFFSET_StgRegTable_rZMM1 :: DynFlags -> Int #

oFFSET_StgRegTable_rZMM2 :: DynFlags -> Int #

oFFSET_StgRegTable_rZMM3 :: DynFlags -> Int #

oFFSET_StgRegTable_rZMM4 :: DynFlags -> Int #

oFFSET_StgRegTable_rZMM5 :: DynFlags -> Int #

oFFSET_StgRegTable_rZMM6 :: DynFlags -> Int #

oFFSET_StgRegTable_rL1 :: DynFlags -> Int #

oFFSET_StgRegTable_rSp :: DynFlags -> Int #

oFFSET_StgRegTable_rSpLim :: DynFlags -> Int #

oFFSET_StgRegTable_rHp :: DynFlags -> Int #

oFFSET_StgRegTable_rHpLim :: DynFlags -> Int #

oFFSET_StgRegTable_rCCCS :: DynFlags -> Int #

oFFSET_StgRegTable_rCurrentTSO :: DynFlags -> Int #

oFFSET_StgRegTable_rCurrentNursery :: DynFlags -> Int #

oFFSET_StgRegTable_rHpAlloc :: DynFlags -> Int #

oFFSET_stgEagerBlackholeInfo :: DynFlags -> Int #

oFFSET_stgGCEnter1 :: DynFlags -> Int #

oFFSET_stgGCFun :: DynFlags -> Int #

oFFSET_Capability_r :: DynFlags -> Int #

oFFSET_bdescr_start :: DynFlags -> Int #

oFFSET_bdescr_free :: DynFlags -> Int #

oFFSET_bdescr_blocks :: DynFlags -> Int #

oFFSET_bdescr_flags :: DynFlags -> Int #

sIZEOF_CostCentreStack :: DynFlags -> Int #

oFFSET_CostCentreStack_mem_alloc :: DynFlags -> Int #

oFFSET_CostCentreStack_scc_count :: DynFlags -> Int #

oFFSET_StgHeader_ccs :: DynFlags -> Int #

oFFSET_StgHeader_ldvw :: DynFlags -> Int #

sIZEOF_StgSMPThunkHeader :: DynFlags -> Int #

oFFSET_StgEntCounter_allocs :: DynFlags -> Int #

oFFSET_StgEntCounter_allocd :: DynFlags -> Int #

oFFSET_StgEntCounter_registeredp :: DynFlags -> Int #

oFFSET_StgEntCounter_link :: DynFlags -> Int #

oFFSET_StgEntCounter_entry_count :: DynFlags -> Int #

sIZEOF_StgUpdateFrame_NoHdr :: DynFlags -> Int #

sIZEOF_StgMutArrPtrs_NoHdr :: DynFlags -> Int #

oFFSET_StgMutArrPtrs_ptrs :: DynFlags -> Int #

oFFSET_StgMutArrPtrs_size :: DynFlags -> Int #

sIZEOF_StgSmallMutArrPtrs_NoHdr :: DynFlags -> Int #

oFFSET_StgSmallMutArrPtrs_ptrs :: DynFlags -> Int #

sIZEOF_StgArrBytes_NoHdr :: DynFlags -> Int #

oFFSET_StgArrBytes_bytes :: DynFlags -> Int #

oFFSET_StgTSO_alloc_limit :: DynFlags -> Int #

oFFSET_StgTSO_cccs :: DynFlags -> Int #

oFFSET_StgTSO_stackobj :: DynFlags -> Int #

oFFSET_StgStack_sp :: DynFlags -> Int #

oFFSET_StgStack_stack :: DynFlags -> Int #

oFFSET_StgUpdateFrame_updatee :: DynFlags -> Int #

oFFSET_StgFunInfoExtraFwd_arity :: DynFlags -> Int #

sIZEOF_StgFunInfoExtraRev :: DynFlags -> Int #

oFFSET_StgFunInfoExtraRev_arity :: DynFlags -> Int #

mAX_SPEC_SELECTEE_SIZE :: DynFlags -> Int #

mAX_SPEC_AP_SIZE :: DynFlags -> Int #

mIN_PAYLOAD_SIZE :: DynFlags -> Int #

mIN_INTLIKE :: DynFlags -> Int #

mAX_INTLIKE :: DynFlags -> Int #

mIN_CHARLIKE :: DynFlags -> Int #

mAX_CHARLIKE :: DynFlags -> Int #

mUT_ARR_PTRS_CARD_BITS :: DynFlags -> Int #

mAX_Vanilla_REG :: DynFlags -> Int #

mAX_Float_REG :: DynFlags -> Int #

mAX_Double_REG :: DynFlags -> Int #

mAX_Long_REG :: DynFlags -> Int #

mAX_XMM_REG :: DynFlags -> Int #

mAX_Real_Vanilla_REG :: DynFlags -> Int #

mAX_Real_Float_REG :: DynFlags -> Int #

mAX_Real_Double_REG :: DynFlags -> Int #

mAX_Real_XMM_REG :: DynFlags -> Int #

mAX_Real_Long_REG :: DynFlags -> Int #

rESERVED_C_STACK_BYTES :: DynFlags -> Int #

rESERVED_STACK_WORDS :: DynFlags -> Int #

aP_STACK_SPLIM :: DynFlags -> Int #

wORD_SIZE :: DynFlags -> Int #

dOUBLE_SIZE :: DynFlags -> Int #

cINT_SIZE :: DynFlags -> Int #

cLONG_SIZE :: DynFlags -> Int #

cLONG_LONG_SIZE :: DynFlags -> Int #

bITMAP_BITS_SHIFT :: DynFlags -> Int #

tAG_BITS :: DynFlags -> Int #

wORDS_BIGENDIAN :: DynFlags -> Bool #

dYNAMIC_BY_DEFAULT :: DynFlags -> Bool #

lDV_SHIFT :: DynFlags -> Int #

iLDV_CREATE_MASK :: DynFlags -> Integer #

iLDV_STATE_CREATE :: DynFlags -> Integer #

iLDV_STATE_USE :: DynFlags -> Integer #

bLOCK_SIZE_W :: DynFlags -> Int #

wORD_SIZE_IN_BITS :: DynFlags -> Int #

tAG_MASK :: DynFlags -> Int #

mAX_PTR_TAG :: DynFlags -> Int #

tARGET_MIN_INT :: DynFlags -> Integer #

tARGET_MAX_INT :: DynFlags -> Integer #

tARGET_MAX_WORD :: DynFlags -> Integer #

unsafeGlobalDynFlags :: DynFlags #

setUnsafeGlobalDynFlags :: DynFlags -> IO () #

# SSE and AVX

isSseEnabled :: DynFlags -> Bool #

isSse2Enabled :: DynFlags -> Bool #

isSse4_2Enabled :: DynFlags -> Bool #

isAvxEnabled :: DynFlags -> Bool #

isAvx2Enabled :: DynFlags -> Bool #

isAvx512cdEnabled :: DynFlags -> Bool #

isAvx512erEnabled :: DynFlags -> Bool #

isAvx512fEnabled :: DynFlags -> Bool #

isAvx512pfEnabled :: DynFlags -> Bool #

# Linker/compiler information

data LinkerInfo #

Constructors

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

Instances

Eq LinkerInfo # |
Methods (==) :: LinkerInfo -> LinkerInfo -> Bool # (/=) :: LinkerInfo -> LinkerInfo -> Bool #

data CompilerInfo #

Constructors

GCC |
Clang |
AppleClang |
AppleClang51 |
UnknownCC |

Instances

Eq CompilerInfo # |
Methods (==) :: CompilerInfo -> CompilerInfo -> Bool # (/=) :: CompilerInfo -> CompilerInfo -> Bool #