A ModGuts is carried through the compiler, accumulating stuff as it goes
There is only one ModGuts at any time, the one for the module
being compiled right now. Once it is compiled, a ModIface and
ModDetails are extracted and the ModGuts is discarded.
Constructors
ModGutsmg_module :: !ModuleModule being compiled
mg_hsc_src :: HscSourceWhether it's an hs-boot module
mg_loc :: SrcSpanFor error messages from inner passes
mg_exports :: ![AvailInfo]What it exports
mg_deps :: !DependenciesWhat it depends on, directly or otherwise
mg_usages :: ![Usage]What was used? Used for interfaces.
mg_used_th :: !BoolDid we run a TH splice?
mg_rdr_env :: !GlobalRdrEnvTop-level lexical environment
mg_fix_env :: !FixityEnvFixities declared in this module. Used for creating interface files.
mg_tcs :: ![TyCon]TyCons declared in this module (includes TyCons for classes)
mg_insts :: ![ClsInst]Class instances declared in this module
mg_fam_insts :: ![FamInst]Family instances declared in this module
mg_patsyns :: ![PatSyn]Pattern synonyms declared in this module
mg_rules :: ![CoreRule]Before the core pipeline starts, contains See Note [Overall plumbing for rules] in GHC.Core.Rules
mg_binds :: !CoreProgramBindings for this module
mg_foreign :: !ForeignStubsForeign exports declared in this module
mg_foreign_files :: ![(ForeignSrcLang, FilePath)]Files to be compiled with the C compiler
mg_warns :: !Warnings GhcRnWarnings declared in the module
mg_anns :: [Annotation]Annotations declared in this module
mg_complete_matches :: [CompleteMatch]Complete Matches
mg_hpc_info :: !HpcInfoCoverage tick boxes in the module
mg_modBreaks :: !Maybe ModBreaksBreakpoints for the module
mg_inst_env :: InstEnvClass instance environment for home-package modules (including this one); c.f.
tcg_inst_envmg_fam_inst_env :: FamInstEnvType-family instance environment for home-package modules (including this one); c.f.
tcg_fam_inst_envmg_boot_exports :: !NameSetmg_safe_haskell :: SafeHaskellModeSafe Haskell mode
mg_trust_pkg :: BoolDo we need to trust our own package for Safe Haskell? See Note [Trust Own Package] in GHC.Rename.Names
mg_docs :: !Maybe DocsDocumentation.