+---------------------------------------------------------
+-- The Tidy pass forks the information about this module:
+-- * one lot goes to interface file generation (ModIface)
+-- and later compilations (ModDetails)
+-- * the other lot goes to code generation (CgGuts)
+data CgGuts
+ = CgGuts {
+ cg_module :: !Module,
+
+ cg_tycons :: [TyCon],
+ -- Algebraic data types (including ones that started
+ -- life as classes); generate constructors and info
+ -- tables Includes newtypes, just for the benefit of
+ -- External Core
+
+ cg_binds :: [CoreBind],
+ -- The tidied main bindings, including
+ -- previously-implicit bindings for record and class
+ -- selectors, and data construtor wrappers. But *not*
+ -- data constructor workers; reason: we we regard them
+ -- as part of the code-gen of tycons
+
+ cg_dir_imps :: ![Module],
+ -- Directly-imported modules; used to generate
+ -- initialisation code
+
+ cg_foreign :: !ForeignStubs,
+ cg_home_mods :: !HomeModules, -- for calling isHomeModule etc.
+ cg_dep_pkgs :: ![PackageId] -- Used to generate #includes for C code gen
+ }