GHC.Driver.Session

ghc-9.2.0.20210422: The GHC API

Safe Haskell | Safe-Inferred
Language | Haskell2010

GHC.Driver.Session

Contents

- Dynamic flags and associated configuration types
  - Safe Haskell
  - LLVM Targets
  - 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
- Include specifications
- SDoc

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_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_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_asm_expanded
  - | Opt_D_dump_c_backend
  - | Opt_D_dump_llvm
  - | 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_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_prep
  - | Opt_D_dump_stg_from_core
  - | Opt_D_dump_stg_unarised
  - | Opt_D_dump_stg_final
  - | Opt_D_dump_call_arity
  - | Opt_D_dump_exitify
  - | Opt_D_dump_stranal
  - | Opt_D_dump_str_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_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_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
- data GeneralFlag
  - = Opt_DumpToFile
  - | Opt_D_faststring_stats
  - | Opt_D_dump_minimal_imports
  - | Opt_DoCoreLinting
  - | Opt_DoLinearCoreLinting
  - | Opt_DoStgLinting
  - | Opt_DoCmmLinting
  - | Opt_DoAsmLinting
  - | Opt_DoAnnotationLinting
  - | Opt_NoLlvmMangler
  - | Opt_FastLlvm
  - | Opt_NoTypeableBinds
  - | Opt_DistinctConstructorTables
  - | Opt_InfoTableMap
  - | 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_PrintTypecheckerElaboration
  - | Opt_CallArity
  - | Opt_Exitification
  - | Opt_Strictness
  - | Opt_LateDmdAnal
  - | Opt_KillAbsence
  - | Opt_KillOneShot
  - | Opt_FullLaziness
  - | Opt_FloatIn
  - | Opt_LateSpecialise
  - | Opt_Specialise
  - | Opt_SpecialiseAggressively
  - | Opt_CrossModuleSpecialise
  - | Opt_InlineGenerics
  - | Opt_InlineGenericsAggressively
  - | Opt_StaticArgumentTransformation
  - | Opt_CSE
  - | Opt_StgCSE
  - | Opt_StgLiftLams
  - | 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_EnableThSpliceWarnings
  - | Opt_RegsGraph
  - | Opt_RegsIterative
  - | Opt_PedanticBottoms
  - | Opt_LlvmTBAA
  - | Opt_LlvmFillUndefWithGarbage
  - | Opt_IrrefutableTuples
  - | Opt_CmmSink
  - | Opt_CmmStaticPred
  - | Opt_CmmElimCommonBlocks
  - | Opt_AsmShortcutting
  - | Opt_OmitYields
  - | Opt_FunToThunk
  - | Opt_DictsStrict
  - | Opt_DmdTxDictSel
  - | Opt_Loopification
  - | Opt_CfgBlocklayout
  - | Opt_WeightlessBlocklayout
  - | Opt_CprAnal
  - | Opt_WorkerWrapper
  - | Opt_SolveConstantDicts
  - | Opt_AlignmentSanitisation
  - | Opt_CatchBottoms
  - | Opt_NumConstantFolding
  - | Opt_SimplPreInlining
  - | Opt_IgnoreInterfacePragmas
  - | Opt_OmitInterfacePragmas
  - | Opt_ExposeAllUnfoldings
  - | Opt_WriteInterface
  - | Opt_WriteHie
  - | Opt_AutoSccsOnIndividualCafs
  - | Opt_ProfCountEntries
  - | Opt_Pp
  - | Opt_ForceRecomp
  - | Opt_IgnoreOptimChanges
  - | Opt_IgnoreHpcChanges
  - | Opt_ExcessPrecision
  - | Opt_EagerBlackHoling
  - | 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_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_RPath
  - | Opt_RelativeDynlibPaths
  - | Opt_Hpc
  - | Opt_FamAppCache
  - | Opt_ExternalInterpreter
  - | Opt_OptimalApplicativeDo
  - | Opt_VersionMacros
  - | Opt_WholeArchiveHsLibs
  - | Opt_SingleLibFolder
  - | Opt_ExposeInternalSymbols
  - | Opt_KeepCAFs
  - | Opt_KeepGoing
  - | Opt_ByteCode
  - | Opt_LinkRts
  - | Opt_ErrorSpans
  - | Opt_DeferDiagnostics
  - | 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_SuppressVarKinds
  - | Opt_SuppressModulePrefixes
  - | Opt_SuppressTypeApplications
  - | Opt_SuppressIdInfo
  - | Opt_SuppressUnfoldings
  - | Opt_SuppressTypeSignatures
  - | Opt_SuppressUniques
  - | Opt_SuppressStgExts
  - | Opt_SuppressTicks
  - | Opt_SuppressTimestamps
  - | 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_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_WarnWarningsDeprecations
  - | Opt_WarnDeprecatedFlags
  - | 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_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
- data WarnReason
  - = NoReason
  - | Reason !WarningFlag
  - | ErrReason !(Maybe WarningFlag)
- data Language
  - = Haskell98
  - | Haskell2010
  - | GHC2021
- data PlatformConstants = 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_CINT_SIZE :: Int
  - pc_CLONG_SIZE :: Int
  - pc_CLONG_LONG_SIZE :: Int
  - pc_BITMAP_BITS_SHIFT :: Int
  - pc_TAG_BITS :: Int
  - 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 ()
- 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
- wopt_set_fatal :: DynFlags -> WarningFlag -> DynFlags
- wopt_unset_fatal :: DynFlags -> WarningFlag -> DynFlags
- 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_Failed
  - | DT_OK
  - | DT_Dyn
- dynamicTooState :: MonadIO m => DynFlags -> m DynamicTooState
- setDynamicNow :: DynFlags -> DynFlags
- setDynamicTooFailed :: MonadIO m => DynFlags -> m ()
- dynamicOutputFile :: DynFlags -> FilePath -> FilePath
- sccProfilingEnabled :: DynFlags -> Bool
- data DynFlags = DynFlags {
  - ghcMode :: GhcMode
  - ghcLink :: GhcLink
  - backend :: !Backend
  - ghcNameVersion :: !GhcNameVersion
  - fileSettings :: !FileSettings
  - targetPlatform :: Platform
  - toolSettings :: !ToolSettings
  - platformMisc :: !PlatformMisc
  - rawSettings :: [(String, String)]
  - llvmConfig :: LlvmConfig
  - verbosity :: Int
  - optLevel :: Int
  - debugLevel :: Int
  - simplPhases :: Int
  - maxSimplIterations :: Int
  - ruleCheck :: Maybe String
  - inlineCheck :: Maybe String
  - strictnessBefore :: [Int]
  - parMakeCount :: Maybe Int
  - enableTimeStats :: Bool
  - ghcHeapSize :: Maybe Int
  - maxRelevantBinds :: Maybe Int
  - maxValidHoleFits :: Maybe Int
  - maxRefHoleFits :: Maybe Int
  - refLevelHoleFits :: Maybe Int
  - maxUncoveredPatterns :: Int
  - maxPmCheckModels :: Int
  - simplTickFactor :: Int
  - specConstrThreshold :: Maybe Int
  - specConstrCount :: Maybe Int
  - specConstrRecursive :: Int
  - binBlobThreshold :: 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
  - homeUnitId_ :: UnitId
  - homeUnitInstanceOf_ :: Maybe UnitId
  - homeUnitInstantiations_ :: [(ModuleName, Module)]
  - 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
  - dynamicTooFailed :: IORef Bool
  - dynObjectSuf_ :: String
  - dynHiSuf_ :: String
  - outputFile_ :: Maybe String
  - dynOutputFile_ :: Maybe String
  - outputHi :: Maybe String
  - dynLibLoader :: DynLibLoader
  - dynamicNow :: !Bool
  - dumpPrefix :: Maybe 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]
  - 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
  - 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 :: EnumSet Extension
  - unfoldingOpts :: !UnfoldingOpts
  - maxWorkerArgs :: Int
  - ghciHistSize :: Int
  - flushOut :: FlushOut
  - flushErr :: FlushErr
  - ghcVersionFile :: Maybe FilePath
  - haddockOptions :: Maybe String
  - ghciScripts :: [String]
  - pprUserLength :: Int
  - pprCols :: Int
  - useUnicode :: Bool
  - useColor :: OverridingBool
  - canUseColor :: Bool
  - colScheme :: Scheme
  - profAuto :: ProfAuto
  - callerCcFilters :: [CallerCcFilter]
  - interactivePrint :: Maybe String
  - nextWrapperNum :: IORef (ModuleEnv Int)
  - sseVersion :: Maybe SseVersion
  - bmiVersion :: Maybe BmiVersion
  - 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 :: Word
  - uniqueIncrement :: Int
  - cfgWeights :: Weights
  }
- outputFile :: DynFlags -> Maybe String
- hiSuf :: DynFlags -> String
- objectSuf :: DynFlags -> String
- ways :: DynFlags -> Ways
- data FlagSpec flag = FlagSpec {
  - flagSpecName :: String
  - flagSpecFlag :: flag
  - flagSpecAction :: TurnOnFlag -> DynP ()
  - flagSpecGhcMode :: GhcFlagMode
  }
- class HasDynFlags m 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
- 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
- fFlags :: [FlagSpec GeneralFlag]
- fLangFlags :: [FlagSpec Extension]
- xFlags :: [FlagSpec Extension]
- wWarningFlags :: [FlagSpec WarningFlag]
- dynFlagDependencies :: DynFlags -> [ModuleName]
- makeDynFlagsConsistent :: DynFlags -> (DynFlags, [Located String])
- positionIndependent :: DynFlags -> Bool
- optimisationFlags :: EnumSet GeneralFlag
- setFlagsFromEnvFile :: FilePath -> String -> DynP ()
- pprDynFlagsDiff :: DynFlags -> DynFlags -> SDoc
- flagSpecOf :: WarningFlag -> Maybe (FlagSpec WarningFlag)
- smallestGroups :: WarningFlag -> [String]
- targetProfile :: DynFlags -> Profile
- safeHaskellOn :: DynFlags -> Bool
- safeHaskellModeEnabled :: 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 LlvmTarget = LlvmTarget {
  - lDataLayout :: String
  - lCPU :: String
  - lAttributes :: [String]
  }
- data LlvmConfig = LlvmConfig {
  - llvmTargets :: [(String, LlvmTarget)]
  - llvmPasses :: [(Int, String)]
  }
- data Settings = Settings {
  - sGhcNameVersion :: !GhcNameVersion
  - sFileSettings :: !FileSettings
  - sTargetPlatform :: Platform
  - sToolSettings :: !ToolSettings
  - sPlatformMisc :: !PlatformMisc
  - sPlatformConstants :: PlatformConstants
  - sRawSettings :: [(String, String)]
  }
- sProgramName :: Settings -> String
- sProjectVersion :: Settings -> String
- sGhcUsagePath :: Settings -> FilePath
- sGhciUsagePath :: Settings -> FilePath
- sToolDir :: Settings -> Maybe FilePath
- sTopDir :: Settings -> FilePath
- sTmpDir :: Settings -> String
- sGlobalPackageDatabasePath :: Settings -> FilePath
- sLdSupportsCompactUnwind :: Settings -> Bool
- sLdSupportsBuildId :: Settings -> Bool
- sLdSupportsFilelist :: Settings -> Bool
- sLdIsGnuLd :: Settings -> Bool
- sGccSupportsNoPie :: Settings -> Bool
- sPgm_L :: Settings -> String
- sPgm_P :: Settings -> (String, [Option])
- sPgm_F :: Settings -> String
- sPgm_c :: Settings -> String
- sPgm_a :: Settings -> (String, [Option])
- sPgm_l :: Settings -> (String, [Option])
- sPgm_lm :: Settings -> (String, [Option])
- sPgm_dll :: Settings -> (String, [Option])
- sPgm_T :: Settings -> String
- sPgm_windres :: Settings -> String
- sPgm_libtool :: Settings -> String
- sPgm_ar :: Settings -> String
- sPgm_ranlib :: Settings -> String
- sPgm_lo :: Settings -> (String, [Option])
- sPgm_lc :: Settings -> (String, [Option])
- sPgm_lcc :: Settings -> (String, [Option])
- sPgm_i :: Settings -> String
- sOpt_L :: Settings -> [String]
- sOpt_P :: Settings -> [String]
- sOpt_P_fingerprint :: Settings -> Fingerprint
- sOpt_F :: Settings -> [String]
- sOpt_c :: Settings -> [String]
- sOpt_cxx :: Settings -> [String]
- sOpt_a :: Settings -> [String]
- sOpt_l :: Settings -> [String]
- sOpt_lm :: Settings -> [String]
- sOpt_windres :: Settings -> [String]
- sOpt_lo :: Settings -> [String]
- sOpt_lc :: Settings -> [String]
- sOpt_lcc :: Settings -> [String]
- sOpt_i :: Settings -> [String]
- sExtraGccViaCFlags :: Settings -> [String]
- sTargetPlatformString :: Settings -> String
- sGhcWithInterpreter :: Settings -> Bool
- sGhcWithSMP :: Settings -> Bool
- sGhcRTSWays :: Settings -> String
- sLibFFI :: Settings -> Bool
- sGhcRtsWithLibdw :: Settings -> Bool
- data GhcNameVersion = GhcNameVersion {
  - ghcNameVersion_programName :: String
  - ghcNameVersion_projectVersion :: String
  }
- data FileSettings = FileSettings {
  - fileSettings_ghcUsagePath :: FilePath
  - fileSettings_ghciUsagePath :: FilePath
  - fileSettings_toolDir :: Maybe FilePath
  - fileSettings_topDir :: FilePath
  - fileSettings_tmpDir :: String
  - fileSettings_globalPackageDatabase :: FilePath
  }
- data PlatformMisc = PlatformMisc {
  - platformMisc_targetPlatformString :: String
  - platformMisc_ghcWithInterpreter :: Bool
  - platformMisc_ghcWithSMP :: Bool
  - platformMisc_ghcRTSWays :: String
  - platformMisc_libFFI :: Bool
  - platformMisc_ghcRtsWithLibdw :: Bool
  - platformMisc_llvmTarget :: String
  }
- settings :: DynFlags -> Settings
- programName :: DynFlags -> String
- projectVersion :: DynFlags -> String
- ghcUsagePath :: DynFlags -> FilePath
- ghciUsagePath :: DynFlags -> FilePath
- topDir :: DynFlags -> FilePath
- tmpDir :: DynFlags -> String
- versionedAppDir :: String -> ArchOS -> MaybeT IO FilePath
- versionedFilePath :: ArchOS -> FilePath
- extraGccViaCFlags :: DynFlags -> [String]
- globalPackageDatabasePath :: DynFlags -> FilePath
- pgm_L :: DynFlags -> String
- pgm_P :: DynFlags -> (String, [Option])
- pgm_F :: DynFlags -> String
- pgm_c :: DynFlags -> String
- pgm_a :: DynFlags -> (String, [Option])
- pgm_l :: DynFlags -> (String, [Option])
- pgm_lm :: DynFlags -> (String, [Option])
- pgm_dll :: DynFlags -> (String, [Option])
- pgm_T :: DynFlags -> String
- pgm_windres :: DynFlags -> String
- pgm_libtool :: DynFlags -> String
- pgm_ar :: DynFlags -> String
- pgm_otool :: DynFlags -> String
- pgm_install_name_tool :: DynFlags -> String
- pgm_ranlib :: DynFlags -> String
- pgm_lo :: DynFlags -> (String, [Option])
- pgm_lc :: DynFlags -> (String, [Option])
- pgm_lcc :: DynFlags -> (String, [Option])
- pgm_i :: DynFlags -> String
- opt_L :: DynFlags -> [String]
- opt_P :: DynFlags -> [String]
- opt_F :: DynFlags -> [String]
- opt_c :: DynFlags -> [String]
- opt_cxx :: DynFlags -> [String]
- opt_a :: DynFlags -> [String]
- opt_l :: DynFlags -> [String]
- opt_lm :: DynFlags -> [String]
- opt_i :: DynFlags -> [String]
- opt_P_signature :: DynFlags -> ([String], Fingerprint)
- opt_windres :: DynFlags -> [String]
- opt_lo :: DynFlags -> [String]
- opt_lc :: DynFlags -> [String]
- opt_lcc :: DynFlags -> [String]
- addPluginModuleName :: String -> DynFlags -> DynFlags
- defaultDynFlags :: Settings -> LlvmConfig -> DynFlags
- defaultWays :: Settings -> Ways
- initDynFlags :: DynFlags -> IO DynFlags
- defaultFatalMessager :: FatalMessager
- defaultFlushOut :: FlushOut
- defaultFlushErr :: FlushErr
- getOpts :: DynFlags -> (DynFlags -> [a]) -> [a]
- getVerbFlags :: DynFlags -> [String]
- updOptLevel :: Int -> DynFlags -> DynFlags
- setTmpDir :: FilePath -> DynFlags -> DynFlags
- setUnitId :: String -> DynFlags -> DynFlags
- type TurnOnFlag = Bool
- turnOn :: TurnOnFlag
- turnOff :: TurnOnFlag
- impliedGFlags :: [(GeneralFlag, TurnOnFlag, GeneralFlag)]
- impliedOffGFlags :: [(GeneralFlag, TurnOnFlag, GeneralFlag)]
- impliedXFlags :: [(Extension, TurnOnFlag, Extension)]
- parseDynamicFlagsCmdLine :: MonadIO m => DynFlags -> [Located String] -> m (DynFlags, [Located String], [Warn])
- parseDynamicFilePragma :: MonadIO m => DynFlags -> [Located String] -> m (DynFlags, [Located String], [Warn])
- parseDynamicFlagsFull :: MonadIO m => [Flag (CmdLineP DynFlags)] -> Bool -> DynFlags -> [Located String] -> m (DynFlags, [Located String], [Warn])
- allNonDeprecatedFlags :: [String]
- flagsAll :: [Flag (CmdLineP DynFlags)]
- flagsDynamic :: [Flag (CmdLineP DynFlags)]
- flagsPackage :: [Flag (CmdLineP DynFlags)]
- flagsForCompletion :: Bool -> [String]
- supportedLanguagesAndExtensions :: ArchOS -> [String]
- languageExtensions :: Maybe Language -> [Extension]
- picCCOpts :: DynFlags -> [String]
- picPOpts :: DynFlags -> [String]
- compilerInfo :: DynFlags -> [(String, String)]
- wordAlignment :: Platform -> Alignment
- setUnsafeGlobalDynFlags :: DynFlags -> IO ()
- isSseEnabled :: Platform -> Bool
- isSse2Enabled :: Platform -> Bool
- isSse4_2Enabled :: DynFlags -> Bool
- isBmiEnabled :: DynFlags -> Bool
- isBmi2Enabled :: 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]
  - | LlvmLLD [Option]
  - | DarwinLD [Option]
  - | SolarisLD [Option]
  - | AixLD [Option]
  - | UnknownLD
- data CompilerInfo
  - = GCC
  - | Clang
  - | AppleClang
  - | AppleClang51
  - | UnknownCC
- data IncludeSpecs = IncludeSpecs {
  - includePathsQuote :: [String]
  - includePathsGlobal :: [String]
  }
- addGlobalInclude :: IncludeSpecs -> [String] -> IncludeSpecs
- addQuoteInclude :: IncludeSpecs -> [String] -> IncludeSpecs
- flattenIncludes :: IncludeSpecs -> [String]
- initSDocContext :: DynFlags -> PprStyle -> SDocContext
- initDefaultSDocContext :: DynFlags -> SDocContext

# Dynamic flags and associated configuration types

data DumpFlag Source #

Debugging flags

Constructors

Opt_D_dump_cmm |
Opt_D_dump_cmm_from_stg |
Opt_D_dump_cmm_raw |
Opt_D_dump_cmm_verbose_by_proc |
Opt_D_dump_cmm_verbose |
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_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_asm_expanded |
Opt_D_dump_c_backend |
Opt_D_dump_llvm |
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_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_prep |
Opt_D_dump_stg_from_core | Initial STG (CoreToStg output)
Opt_D_dump_stg_unarised | STG after unarise
Opt_D_dump_stg_final | Final STG (after stg2stg)
Opt_D_dump_call_arity |
Opt_D_dump_exitify |
Opt_D_dump_stranal |
Opt_D_dump_str_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_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_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 |

#### Instances

Instances details

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

data GeneralFlag Source #

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_DoLinearCoreLinting |
Opt_DoStgLinting |
Opt_DoCmmLinting |
Opt_DoAsmLinting |
Opt_DoAnnotationLinting |
Opt_NoLlvmMangler |
Opt_FastLlvm |
Opt_NoTypeableBinds |
Opt_DistinctConstructorTables |
Opt_InfoTableMap |
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_PrintTypecheckerElaboration |
Opt_CallArity |
Opt_Exitification |
Opt_Strictness |
Opt_LateDmdAnal |
Opt_KillAbsence |
Opt_KillOneShot |
Opt_FullLaziness |
Opt_FloatIn |
Opt_LateSpecialise |
Opt_Specialise |
Opt_SpecialiseAggressively |
Opt_CrossModuleSpecialise |
Opt_InlineGenerics |
Opt_InlineGenericsAggressively |
Opt_StaticArgumentTransformation |
Opt_CSE |
Opt_StgCSE |
Opt_StgLiftLams |
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_EnableThSpliceWarnings |
Opt_RegsGraph |
Opt_RegsIterative |
Opt_PedanticBottoms |
Opt_LlvmTBAA |
Opt_LlvmFillUndefWithGarbage |
Opt_IrrefutableTuples |
Opt_CmmSink |
Opt_CmmStaticPred |
Opt_CmmElimCommonBlocks |
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_SolveConstantDicts |
Opt_AlignmentSanitisation |
Opt_CatchBottoms |
Opt_NumConstantFolding |
Opt_SimplPreInlining |
Opt_IgnoreInterfacePragmas |
Opt_OmitInterfacePragmas |
Opt_ExposeAllUnfoldings |
Opt_WriteInterface |
Opt_WriteHie |
Opt_AutoSccsOnIndividualCafs |
Opt_ProfCountEntries |
Opt_Pp |
Opt_ForceRecomp |
Opt_IgnoreOptimChanges |
Opt_IgnoreHpcChanges |
Opt_ExcessPrecision |
Opt_EagerBlackHoling |
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_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_RPath |
Opt_RelativeDynlibPaths |
Opt_Hpc |
Opt_FamAppCache |
Opt_ExternalInterpreter |
Opt_OptimalApplicativeDo |
Opt_VersionMacros |
Opt_WholeArchiveHsLibs |
Opt_SingleLibFolder |
Opt_ExposeInternalSymbols |
Opt_KeepCAFs |
Opt_KeepGoing |
Opt_ByteCode |
Opt_LinkRts |
Opt_ErrorSpans |
Opt_DeferDiagnostics |
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_SuppressVarKinds |
Opt_SuppressModulePrefixes |
Opt_SuppressTypeApplications |
Opt_SuppressIdInfo |
Opt_SuppressUnfoldings |
Opt_SuppressTypeSignatures |
Opt_SuppressUniques |
Opt_SuppressStgExts |
Opt_SuppressTicks |
Opt_SuppressTimestamps | Suppress timestamps in dumps
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_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 Source # pred :: GeneralFlag -> GeneralFlag Source # toEnum :: Int -> GeneralFlag Source # fromEnum :: GeneralFlag -> Int Source # enumFrom :: GeneralFlag -> [GeneralFlag] Source # enumFromThen :: GeneralFlag -> GeneralFlag -> [GeneralFlag] Source # enumFromTo :: GeneralFlag -> GeneralFlag -> [GeneralFlag] Source # enumFromThenTo :: GeneralFlag -> GeneralFlag -> GeneralFlag -> [GeneralFlag] Source #
Show GeneralFlag # |
Instance details Defined in GHC.Driver.Flags Methods showsPrec :: Int -> GeneralFlag -> ShowS Source # show :: GeneralFlag -> String Source # showList :: [GeneralFlag] -> ShowS Source #
Eq GeneralFlag # |
Instance details Defined in GHC.Driver.Flags Methods (==) :: GeneralFlag -> GeneralFlag -> Bool # (/=) :: GeneralFlag -> GeneralFlag -> Bool #

data WarningFlag Source #

Constructors

Opt_WarnDuplicateExports |
Opt_WarnDuplicateConstraints |
Opt_WarnRedundantConstraints |
Opt_WarnHiShadows |
Opt_WarnImplicitPrelude |
Opt_WarnIncompletePatterns |
Opt_WarnIncompleteUniPatterns |
Opt_WarnIncompletePatternsRecUpd |
Opt_WarnOverflowedLiterals |
Opt_WarnEmptyEnumerations |
Opt_WarnMissingFields |
Opt_WarnMissingImportList |
Opt_WarnMissingMethods |
Opt_WarnMissingSignatures |
Opt_WarnMissingLocalSignatures |
Opt_WarnNameShadowing |
Opt_WarnOverlappingPatterns |
Opt_WarnTypeDefaults |
Opt_WarnMonomorphism |
Opt_WarnUnusedTopBinds |
Opt_WarnUnusedLocalBinds |
Opt_WarnUnusedPatternBinds |
Opt_WarnUnusedImports |
Opt_WarnUnusedMatches |
Opt_WarnUnusedTypePatterns |
Opt_WarnUnusedForalls |
Opt_WarnUnusedRecordWildcards |
Opt_WarnRedundantBangPatterns |
Opt_WarnRedundantRecordWildcards |
Opt_WarnWarningsDeprecations |
Opt_WarnDeprecatedFlags |
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_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 |

#### Instances

Instances details

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

data WarnReason Source #

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 | Warning was enabled with the flag
ErrReason !(Maybe WarningFlag) | Warning was made an error because of -Werror or -Werror=WarningFlag

#### Instances

Instances details

Show WarnReason # |
Instance details Defined in GHC.Driver.Flags Methods showsPrec :: Int -> WarnReason -> ShowS Source # show :: WarnReason -> String Source # showList :: [WarnReason] -> ShowS Source #
ToJson WarnReason # |
Instance details Defined in GHC.Driver.Flags Methods json :: WarnReason -> JsonDoc Source #
Outputable WarnReason # |
Instance details Defined in GHC.Driver.Flags Methods ppr :: WarnReason -> SDoc Source #

data Language Source #

Constructors

Haskell98 |
Haskell2010 |
GHC2021 |

#### Instances

Instances details

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

data PlatformConstants Source #

Constructors

PlatformConstants |
Fields 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_CINT_SIZE :: Int pc_CLONG_SIZE :: Int pc_CLONG_LONG_SIZE :: Int pc_BITMAP_BITS_SHIFT :: Int pc_TAG_BITS :: Int 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

Instances details

Read PlatformConstants # |
Instance details Defined in GHC.Platform.Constants Methods readsPrec :: Int -> ReadS PlatformConstants Source # readList :: ReadS [PlatformConstants] Source # readPrec :: ReadPrec PlatformConstants Source # readListPrec :: ReadPrec [PlatformConstants] Source #
Show PlatformConstants # |
Instance details Defined in GHC.Platform.Constants Methods showsPrec :: Int -> PlatformConstants -> ShowS Source # show :: PlatformConstants -> String Source # showList :: [PlatformConstants] -> ShowS Source #
Eq PlatformConstants # |
Instance details Defined in GHC.Platform.Constants Methods (==) :: PlatformConstants -> PlatformConstants -> Bool # (/=) :: PlatformConstants -> PlatformConstants -> Bool #

type FatalMessager = String -> IO () Source #

newtype FlushOut Source #

Constructors

FlushOut (IO ()) |

newtype FlushErr Source #

Constructors

FlushErr (IO ()) |

data ProfAuto Source #

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.Driver.Session 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 # |
Instance details Defined in GHC.Driver.Session Methods (==) :: ProfAuto -> ProfAuto -> Bool # (/=) :: ProfAuto -> ProfAuto -> Bool #

glasgowExtsFlags :: [Extension] Source #

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

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]] Source #

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

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

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

The special-case Weverything group is not included.

hasPprDebug :: DynFlags -> Bool Source #

hasNoDebugOutput :: DynFlags -> Bool Source #

hasNoStateHack :: DynFlags -> Bool Source #

hasNoOptCoercion :: DynFlags -> Bool Source #

dopt :: DumpFlag -> DynFlags -> Bool Source #

Test whether a `DumpFlag` is set

dopt_set :: DynFlags -> DumpFlag -> DynFlags Source #

Set a `DumpFlag`

dopt_unset :: DynFlags -> DumpFlag -> DynFlags Source #

Unset a `DumpFlag`

gopt :: GeneralFlag -> DynFlags -> Bool Source #

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

Set a `GeneralFlag`

gopt_unset :: DynFlags -> GeneralFlag -> DynFlags Source #

Unset a `GeneralFlag`

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

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

wopt :: WarningFlag -> DynFlags -> Bool Source #

Test whether a `WarningFlag` is set

wopt_set :: DynFlags -> WarningFlag -> DynFlags Source #

Set a `WarningFlag`

wopt_unset :: DynFlags -> WarningFlag -> DynFlags Source #

Unset a `WarningFlag`

wopt_fatal :: WarningFlag -> DynFlags -> Bool Source #

Test whether a `WarningFlag` is set as fatal

wopt_set_fatal :: DynFlags -> WarningFlag -> DynFlags Source #

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

wopt_unset_fatal :: DynFlags -> WarningFlag -> DynFlags Source #

Mark a `WarningFlag` as not fatal

xopt :: Extension -> DynFlags -> Bool Source #

Test whether a `Extension` is set

xopt_set :: DynFlags -> Extension -> DynFlags Source #

Set a `Extension`

xopt_unset :: DynFlags -> Extension -> DynFlags Source #

Unset a `Extension`

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

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

xopt_DuplicateRecordFields :: DynFlags -> DuplicateRecordFields Source #

xopt_FieldSelectors :: DynFlags -> FieldSelectors Source #

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

data DynamicTooState Source #

Constructors

DT_Dont | Don't try to build dynamic objects too
DT_Failed | Won't try to generate dynamic objects for some reason
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.Session Methods showsPrec :: Int -> DynamicTooState -> ShowS Source # show :: DynamicTooState -> String Source # showList :: [DynamicTooState] -> ShowS Source #
Eq DynamicTooState # |
Instance details Defined in GHC.Driver.Session Methods (==) :: DynamicTooState -> DynamicTooState -> Bool # (/=) :: DynamicTooState -> DynamicTooState -> Bool #
Ord DynamicTooState # |
Instance details Defined in GHC.Driver.Session 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 :: MonadIO m => DynFlags -> m DynamicTooState Source #

setDynamicNow :: DynFlags -> DynFlags Source #

setDynamicTooFailed :: MonadIO m => DynFlags -> m () Source #

dynamicOutputFile :: DynFlags -> FilePath -> FilePath Source #

Compute the path of the dynamic object corresponding to an object file.

sccProfilingEnabled :: DynFlags -> Bool Source #

Indicate if cost-centre profiling is enabled

data DynFlags Source #

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)] llvmConfig :: LlvmConfig N.B. It's important that this field is lazy since we load the LLVM configuration lazily. See Note [LLVM Configuration] in GHC.SysTools. 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 ruleCheck :: Maybe String inlineCheck :: Maybe String A prefix to report inlining decisions about 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 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 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 :: 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 to disable) 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 homeUnitId_ :: UnitId Target home unit-id homeUnitInstanceOf_ :: Maybe UnitId Id of the unit to instantiate homeUnitInstantiations_ :: [(ModuleName, Module)] Module instantiations 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 dynamicTooFailed :: IORef Bool dynObjectSuf_ :: String dynHiSuf_ :: String outputFile_ :: Maybe String dynOutputFile_ :: Maybe String outputHi :: 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 :: Maybe FilePath This is set by `runPipeline` or 'ghc.GHCi.UI.runStmt' based on where its output is going. dumpPrefixForce :: Maybe FilePath Override the `dumpPrefix` set by `runPipeline` 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] 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. 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 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 :: EnumSet Extension unfoldingOpts :: !UnfoldingOpts Unfolding control See Note [Discounts and thresholds] in GHC.Core.Unfold maxWorkerArgs :: Int ghciHistSize :: Int flushOut :: FlushOut flushErr :: FlushErr 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 colScheme :: Scheme profAuto :: ProfAuto what kind of {-# SCC #-} to add automatically callerCcFilters :: [CallerCcFilter] interactivePrint :: Maybe String nextWrapperNum :: IORef (ModuleEnv Int) sseVersion :: Maybe SseVersion Machine dependent flags (-m<blah> stuff) bmiVersion :: Maybe BmiVersion 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 :: Word Unique supply configuration for testing build determinism uniqueIncrement :: Int cfgWeights :: Weights Temporary: CFG Edge weights for fast iterations

outputFile :: DynFlags -> Maybe String Source #

hiSuf :: DynFlags -> String Source #

objectSuf :: DynFlags -> String Source #

ways :: DynFlags -> Ways Source #

data FlagSpec flag Source #

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

Methods

getDynFlags :: m DynFlags Source #

#### Instances

Instances details

HasDynFlags PD # |
Instance details Defined in GHC.Cmm.Parser.Monad Methods getDynFlags :: PD DynFlags Source #
HasDynFlags LlvmM # |
Instance details Defined in GHC.CmmToLlvm.Base Methods getDynFlags :: LlvmM DynFlags Source #
HasDynFlags CoreM # |
Instance details Defined in GHC.Core.Opt.Monad Methods getDynFlags :: CoreM DynFlags Source #
HasDynFlags SimplM # |
Instance details Defined in GHC.Core.Opt.Simplify.Monad Methods getDynFlags :: SimplM DynFlags Source #
HasDynFlags Hsc # |
Instance details Defined in GHC.Driver.Env.Types Methods getDynFlags :: Hsc DynFlags Source #
HasDynFlags Ghc # |
Instance details Defined in GHC.Driver.Monad Methods getDynFlags :: Ghc DynFlags Source #
HasDynFlags CompPipeline # |
Instance details Defined in GHC.Driver.Pipeline.Monad Methods getDynFlags :: CompPipeline DynFlags Source #
HasDynFlags LiftM # |
Instance details Defined in GHC.Stg.Lift.Monad Methods getDynFlags :: LiftM DynFlags Source #
HasDynFlags CmmParse # |
Instance details Defined in GHC.StgToCmm.ExtCode Methods getDynFlags :: CmmParse DynFlags Source #
HasDynFlags FCode # |
Instance details Defined in GHC.StgToCmm.Monad Methods getDynFlags :: FCode DynFlags Source #
HasDynFlags TcS # |
Instance details Defined in GHC.Tc.Solver.Monad Methods getDynFlags :: TcS DynFlags Source #
ContainsDynFlags env => HasDynFlags (IOEnv env) # |
Instance details Defined in GHC.Data.IOEnv Methods getDynFlags :: IOEnv env DynFlags Source #
MonadIO m => HasDynFlags (GhcT m) # |
Instance details Defined in GHC.Driver.Monad Methods getDynFlags :: GhcT m DynFlags Source #
(Monad m, HasDynFlags m) => HasDynFlags (MaybeT m) # |
Instance details Defined in GHC.Driver.Session Methods getDynFlags :: MaybeT m DynFlags Source #
(Monad m, HasDynFlags m) => HasDynFlags (ExceptT e m) # |
Instance details Defined in GHC.Driver.Session Methods getDynFlags :: ExceptT e m DynFlags Source #
(Monad m, HasDynFlags m) => HasDynFlags (ReaderT a m) # |
Instance details Defined in GHC.Driver.Session Methods getDynFlags :: ReaderT a m DynFlags Source #
(Monoid a, Monad m, HasDynFlags m) => HasDynFlags (WriterT a m) # |
Instance details Defined in GHC.Driver.Session Methods getDynFlags :: WriterT a m DynFlags Source #

class ContainsDynFlags t where Source #

Methods

extractDynFlags :: t -> DynFlags Source #

#### Instances

Instances details

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

data RtsOptsEnabled Source #

Constructors

RtsOptsNone |
RtsOptsIgnore |
RtsOptsIgnoreAll |
RtsOptsSafeOnly |
RtsOptsAll |

#### Instances

Instances details

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

data GhcMode Source #

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.Session Methods ppr :: GhcMode -> SDoc Source #
Eq GhcMode # |
Instance details Defined in GHC.Driver.Session Methods (==) :: GhcMode -> GhcMode -> Bool # (/=) :: GhcMode -> GhcMode -> Bool #

isOneShot :: GhcMode -> Bool Source #

data GhcLink Source #

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

Instances details

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

isNoLink :: GhcLink -> Bool Source #

data PackageFlag Source #

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.Session Methods ppr :: PackageFlag -> SDoc Source #
Eq PackageFlag # |
Instance details Defined in GHC.Driver.Session Methods (==) :: PackageFlag -> PackageFlag -> Bool # (/=) :: PackageFlag -> PackageFlag -> Bool #

data PackageArg Source #

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.Session Methods showsPrec :: Int -> PackageArg -> ShowS Source # show :: PackageArg -> String Source # showList :: [PackageArg] -> ShowS Source #
Outputable PackageArg # |
Instance details Defined in GHC.Driver.Session Methods ppr :: PackageArg -> SDoc Source #
Eq PackageArg # |
Instance details Defined in GHC.Driver.Session Methods (==) :: PackageArg -> PackageArg -> Bool # (/=) :: PackageArg -> PackageArg -> Bool #

data ModRenaming Source #

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.Session Methods ppr :: ModRenaming -> SDoc Source #
Eq ModRenaming # |
Instance details Defined in GHC.Driver.Session Methods (==) :: ModRenaming -> ModRenaming -> Bool # (/=) :: ModRenaming -> ModRenaming -> Bool #

packageFlagsChanged :: DynFlags -> DynFlags -> Bool Source #

newtype IgnorePackageFlag Source #

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.Session Methods (==) :: IgnorePackageFlag -> IgnorePackageFlag -> Bool # (/=) :: IgnorePackageFlag -> IgnorePackageFlag -> Bool #

data TrustFlag Source #

Flags for manipulating package trust.

Constructors

TrustPackage String |
    -trust
DistrustPackage String |
    -distrust

#### Instances

Instances details

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

data PackageDBFlag Source #

Constructors

PackageDB PkgDbRef |
NoUserPackageDB |
NoGlobalPackageDB |
ClearPackageDBs |

#### Instances

Instances details

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

data PkgDbRef Source #

Constructors

GlobalPkgDb |
UserPkgDb |
PkgDbPath FilePath |

#### Instances

Instances details

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

data Option Source #

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

data DynLibLoader Source #

Constructors

Deployable |
SystemDependent |

#### Instances

Instances details

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

fFlags :: [FlagSpec GeneralFlag] Source #

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

fLangFlags :: [FlagSpec Extension] Source #

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

xFlags :: [FlagSpec Extension] Source #

These -Xblah flags can all be reversed with -XNoblah

wWarningFlags :: [FlagSpec WarningFlag] Source #

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

dynFlagDependencies :: DynFlags -> [ModuleName] Source #

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

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

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.

positionIndependent :: DynFlags -> Bool Source #

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

optimisationFlags :: EnumSet GeneralFlag Source #

setFlagsFromEnvFile :: FilePath -> String -> DynP () Source #

pprDynFlagsDiff :: DynFlags -> DynFlags -> SDoc Source #

Pretty-print the difference between 2 DynFlags.

For now only their general flags but it could be extended. Useful mostly for debugging.

flagSpecOf :: WarningFlag -> Maybe (FlagSpec WarningFlag) Source #

Find the `FlagSpec` for a `WarningFlag`.

smallestGroups :: WarningFlag -> [String] Source #

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

targetProfile :: DynFlags -> Profile Source #

Get target profile

## Safe Haskell

safeHaskellOn :: DynFlags -> Bool Source #

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

safeHaskellModeEnabled :: DynFlags -> Bool Source #

safeImportsOn :: DynFlags -> Bool Source #

Test if Safe Imports are on in some form

safeLanguageOn :: DynFlags -> Bool Source #

Is the Safe Haskell safe language in use

safeInferOn :: DynFlags -> Bool Source #

Is the Safe Haskell safe inference mode active

packageTrustOn :: DynFlags -> Bool Source #

Is the -fpackage-trust mode on

safeDirectImpsReq :: DynFlags -> Bool Source #

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

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)] Source #

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)] Source #

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

## LLVM Targets

data LlvmTarget Source #

Constructors

LlvmTarget |
Fields lDataLayout :: String lCPU :: String lAttributes :: [String]

data LlvmConfig Source #

See Note [LLVM Configuration] in GHC.SysTools.

Constructors

LlvmConfig |
Fields llvmTargets :: [(String, LlvmTarget)] llvmPasses :: [(Int, String)]

## System tool settings and locations

data Settings Source #

Constructors

Settings |
Fields sGhcNameVersion :: !GhcNameVersion sFileSettings :: !FileSettings sTargetPlatform :: Platform sToolSettings :: !ToolSettings sPlatformMisc :: !PlatformMisc sPlatformConstants :: PlatformConstants sRawSettings :: [(String, String)]

sProgramName :: Settings -> String Source #

sProjectVersion :: Settings -> String Source #

sGhcUsagePath :: Settings -> FilePath Source #

sGhciUsagePath :: Settings -> FilePath Source #

sToolDir :: Settings -> Maybe FilePath Source #

sTopDir :: Settings -> FilePath Source #

sTmpDir :: Settings -> String Source #

sGlobalPackageDatabasePath :: Settings -> FilePath Source #

sLdSupportsCompactUnwind :: Settings -> Bool Source #

sLdSupportsBuildId :: Settings -> Bool Source #

sLdSupportsFilelist :: Settings -> Bool Source #

sLdIsGnuLd :: Settings -> Bool Source #

sGccSupportsNoPie :: Settings -> Bool Source #

sPgm_L :: Settings -> String Source #

sPgm_P :: Settings -> (String, [Option]) Source #

sPgm_F :: Settings -> String Source #

sPgm_c :: Settings -> String Source #

sPgm_a :: Settings -> (String, [Option]) Source #

sPgm_l :: Settings -> (String, [Option]) Source #

sPgm_lm :: Settings -> (String, [Option]) Source #

sPgm_dll :: Settings -> (String, [Option]) Source #

sPgm_T :: Settings -> String Source #

sPgm_windres :: Settings -> String Source #

sPgm_libtool :: Settings -> String Source #

sPgm_ar :: Settings -> String Source #

sPgm_ranlib :: Settings -> String Source #

sPgm_lo :: Settings -> (String, [Option]) Source #

sPgm_lc :: Settings -> (String, [Option]) Source #

sPgm_lcc :: Settings -> (String, [Option]) Source #

sPgm_i :: Settings -> String Source #

sOpt_L :: Settings -> [String] Source #

sOpt_P :: Settings -> [String] Source #

sOpt_P_fingerprint :: Settings -> Fingerprint Source #

sOpt_F :: Settings -> [String] Source #

sOpt_c :: Settings -> [String] Source #

sOpt_cxx :: Settings -> [String] Source #

sOpt_a :: Settings -> [String] Source #

sOpt_l :: Settings -> [String] Source #

sOpt_lm :: Settings -> [String] Source #

sOpt_windres :: Settings -> [String] Source #

sOpt_lo :: Settings -> [String] Source #

sOpt_lc :: Settings -> [String] Source #

sOpt_lcc :: Settings -> [String] Source #

sOpt_i :: Settings -> [String] Source #

sExtraGccViaCFlags :: Settings -> [String] Source #

sTargetPlatformString :: Settings -> String Source #

sGhcWithInterpreter :: Settings -> Bool Source #

sGhcWithSMP :: Settings -> Bool Source #

sGhcRTSWays :: Settings -> String Source #

sLibFFI :: Settings -> Bool Source #

sGhcRtsWithLibdw :: Settings -> Bool Source #

data GhcNameVersion Source #

Settings for what GHC this is.

Constructors

GhcNameVersion |
Fields ghcNameVersion_programName :: String ghcNameVersion_projectVersion :: String

data FileSettings Source #

Paths to various files and directories used by GHC, including those that provide more settings.

Constructors

FileSettings |
Fields fileSettings_ghcUsagePath :: FilePath fileSettings_ghciUsagePath :: FilePath fileSettings_toolDir :: Maybe FilePath fileSettings_topDir :: FilePath fileSettings_tmpDir :: String fileSettings_globalPackageDatabase :: FilePath

data PlatformMisc Source #

Platform-specific settings formerly hard-coded in Config.hs.

These should probably be all be triaged whether they can be computed from other settings or belong in another another place (like `Platform` above).

Constructors

PlatformMisc |
Fields platformMisc_targetPlatformString :: String platformMisc_ghcWithInterpreter :: Bool platformMisc_ghcWithSMP :: Bool platformMisc_ghcRTSWays :: String platformMisc_libFFI :: Bool platformMisc_ghcRtsWithLibdw :: Bool platformMisc_llvmTarget :: String

settings :: DynFlags -> Settings Source #

"unbuild" a `Settings` from a `DynFlags`. This shouldn't be needed in the vast majority of code. But GHCi questionably uses this to produce a default `DynFlags` from which to compute a flags diff for printing.

programName :: DynFlags -> String Source #

projectVersion :: DynFlags -> String Source #

ghcUsagePath :: DynFlags -> FilePath Source #

ghciUsagePath :: DynFlags -> FilePath Source #

topDir :: DynFlags -> FilePath Source #

tmpDir :: DynFlags -> String Source #

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

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

versionedFilePath :: ArchOS -> FilePath Source #

extraGccViaCFlags :: DynFlags -> [String] Source #

globalPackageDatabasePath :: DynFlags -> FilePath Source #

pgm_L :: DynFlags -> String Source #

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

pgm_F :: DynFlags -> String Source #

pgm_c :: DynFlags -> String Source #

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

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

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

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

pgm_T :: DynFlags -> String Source #

pgm_windres :: DynFlags -> String Source #

pgm_libtool :: DynFlags -> String Source #

pgm_ar :: DynFlags -> String Source #

pgm_otool :: DynFlags -> String Source #

pgm_install_name_tool :: DynFlags -> String Source #

pgm_ranlib :: DynFlags -> String Source #

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

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

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

pgm_i :: DynFlags -> String Source #

opt_L :: DynFlags -> [String] Source #

opt_P :: DynFlags -> [String] Source #

opt_F :: DynFlags -> [String] Source #

opt_c :: DynFlags -> [String] Source #

opt_cxx :: DynFlags -> [String] Source #

opt_a :: DynFlags -> [String] Source #

opt_l :: DynFlags -> [String] Source #

opt_lm :: DynFlags -> [String] Source #

opt_i :: DynFlags -> [String] Source #

opt_P_signature :: DynFlags -> ([String], Fingerprint) Source #

opt_windres :: DynFlags -> [String] Source #

opt_lo :: DynFlags -> [String] Source #

opt_lc :: DynFlags -> [String] Source #

opt_lcc :: DynFlags -> [String] Source #

## Manipulating DynFlags

addPluginModuleName :: String -> DynFlags -> DynFlags Source #

defaultDynFlags :: Settings -> LlvmConfig -> DynFlags Source #

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

defaultWays :: Settings -> Ways Source #

initDynFlags :: DynFlags -> IO DynFlags Source #

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

defaultFatalMessager :: FatalMessager Source #

defaultFlushOut :: FlushOut Source #

defaultFlushErr :: FlushErr Source #

getOpts Source #

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] Source #

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

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

setTmpDir :: FilePath -> DynFlags -> DynFlags Source #

setUnitId :: String -> DynFlags -> DynFlags Source #

type TurnOnFlag = Bool Source #

turnOn :: TurnOnFlag Source #

turnOff :: TurnOnFlag Source #

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

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

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

## Parsing DynFlags

parseDynamicFlagsCmdLine Source #

Arguments

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

Parse dynamic flags from a list of command line arguments. Returns 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 Source #

Arguments

:: MonadIO m |
=> DynFlags |
-> [Located String] |
-> m (DynFlags, [Located String], [Warn]) | 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 Source #

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], [Warn]) |

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] Source #

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

flagsAll :: [Flag (CmdLineP DynFlags)] Source #

flagsDynamic :: [Flag (CmdLineP DynFlags)] Source #

flagsPackage :: [Flag (CmdLineP DynFlags)] Source #

flagsForCompletion :: Bool -> [String] Source #

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

supportedLanguagesAndExtensions :: ArchOS -> [String] Source #

languageExtensions :: Maybe Language -> [Extension] Source #

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

## DynFlags C compiler options

picCCOpts :: DynFlags -> [String] Source #

picPOpts :: DynFlags -> [String] Source #

# Compiler configuration suitable for display to the user

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

wordAlignment :: Platform -> Alignment Source #

setUnsafeGlobalDynFlags :: DynFlags -> IO () Source #

# SSE and AVX

isSseEnabled :: Platform -> Bool Source #

isSse2Enabled :: Platform -> Bool Source #

isSse4_2Enabled :: DynFlags -> Bool Source #

isBmiEnabled :: DynFlags -> Bool Source #

isBmi2Enabled :: DynFlags -> Bool Source #

isAvxEnabled :: DynFlags -> Bool Source #

isAvx2Enabled :: DynFlags -> Bool Source #

isAvx512cdEnabled :: DynFlags -> Bool Source #

isAvx512erEnabled :: DynFlags -> Bool Source #

isAvx512fEnabled :: DynFlags -> Bool Source #

isAvx512pfEnabled :: DynFlags -> Bool Source #

# Linker/compiler information

data LinkerInfo Source #

Constructors

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

#### Instances

Instances details

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

data CompilerInfo Source #

Constructors

GCC |
Clang |
AppleClang |
AppleClang51 |
UnknownCC |

#### Instances

Instances details

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

# Include specifications

data IncludeSpecs Source #

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]

#### Instances

Instances details

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

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

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

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] Source #

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

# SDoc

initSDocContext :: DynFlags -> PprStyle -> SDocContext Source #

Initialize the pretty-printing options

initDefaultSDocContext :: DynFlags -> SDocContext Source #

Initialize the pretty-printing options using the default user style