+type ExportItem = (Module, [(OccName, [OccName])])
+type VersionInfo name = [ImportVersion name]
+type ImportVersion name = (Module, Version, [LocalVersion name])
+type LocalVersion name = (name, Version)
+
+data ParsedIface
+ = 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
+ ExportEnv, -- What this module exports
+ [Module]) -- Instance modules
+
+type RdrNamePragma = () -- Fudge for now
+-------------------
+
+data Ifaces = Ifaces
+ Module -- Name of this module
+ (FiniteMap Module Version)
+ (FiniteMap Module (Avails, [(OccName,Fixity)])) -- Exports
+ 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. Subset of
+ -- the previous field. This is used to generate the "usage" information
+ -- for this module.
+
+ (Bag IfaceInst) -- Un-slurped instance decls; this bag is depleted when we
+ -- slurp an instance decl so that we don't slurp the same one twice.
+
+ [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.
+\end{code}