- = ParsedIface
- Module -- Module name
- Version -- Module version number
- [ImportVersion OccName] -- Usages
- [ExportItem] -- Exports
- [Module] -- Special instance modules
- [(OccName,Fixity)] -- Fixities
- [(Version, RdrNameHsDecl)] -- Local definitions
- [RdrNameInstDecl] -- Local instance declarations
-
-type InterfaceDetails = (VersionInfo Name, -- Version information for what this module imports
- ExportEnv, -- What this module exports
- [Module]) -- Instance modules
-
-type RdrNamePragma = () -- Fudge for now
--------------------
-
-data Ifaces = Ifaces
- Module -- Name of this module
- (FiniteMap Module (IfaceFlavour, -- Exports
- Version,
- Avails,
- [(OccName,Fixity)]))
- DeclsMap
-
- NameSet -- All the names (whether "big" or "small", whether wired-in or not,
- -- whether locally defined or not) that have been slurped in so far.
-
- [(Name,Version)] -- All the (a) non-wired-in (b) "big" (c) non-locally-defined names that
- -- have been slurped in so far, with their versions.
- -- This is used to generate the "usage" information for this module.
- -- Subset of the previous field.
-
- (Bag IfaceInst, NameSet) -- The as-yet un-slurped instance decls; this bag is depleted when we
- -- slurp an instance decl so that we don't slurp the same one twice.
- -- Together with them is the set of tycons/classes that may allow
- -- the instance decls in.
-
- (FiniteMap Name RdrNameTyDecl)
- -- Deferred data type declarations; each has the following properties
- -- * it's a data type decl
- -- * its TyCon is needed
- -- * the decl may or may not have been slurped, depending on whether any
- -- of the constrs are needed.
-
- [Module] -- Set of modules with "special" instance declarations
- -- Excludes this module
-
-
-type DeclsMap = FiniteMap Name (Version, AvailInfo, RdrNameHsDecl)
-type IfaceInst = ((Module, RdrNameInstDecl), -- Instance decl
- [Name]) -- "Gate" names. Slurp this instance decl when this
- -- list becomes empty. It's depleted whenever we
- -- slurp another type or class decl.
+ = ParsedIface {
+ pi_mod :: Module, -- Complete with package info
+ pi_vers :: Version, -- Module version number
+ pi_orphan :: WhetherHasOrphans, -- Whether this module has orphans
+ pi_usages :: [ImportVersion OccName], -- Usages
+ pi_exports :: (Version, [ExportItem]), -- Exports
+ pi_decls :: [(Version, RdrNameTyClDecl)], -- Local definitions
+ pi_fixity :: [RdrNameFixitySig], -- Local fixity declarations,
+ pi_insts :: [RdrNameInstDecl], -- Local instance declarations
+ pi_rules :: (Version, [RdrNameRuleDecl]), -- Rules, with their version
+ pi_deprecs :: IfaceDeprecs -- Deprecations
+ }