\end{code}
\begin{code}
-type LocalVersionsMap = FiniteMap FAST_STRING Version
+type UsagesMap = FiniteMap Module (Version, VersionsMap)
+ -- module => its version, then to all its entities
+ -- and their versions; "instance" is a magic entity
+ -- representing all the instances def'd in that module
+type VersionsMap = FiniteMap FAST_STRING Version
+ -- Versions for things def'd in this module
type ExportsMap = FiniteMap FAST_STRING (RdrName, ExportFlag)
type FixitiesMap = FiniteMap FAST_STRING RdrNameFixityDecl
type LocalTyDefsMap = FiniteMap FAST_STRING RdrIfaceDecl -- for TyCon/Class
Module -- Module name
Version -- Module version number
(Maybe Version) -- Source version number
- LocalVersionsMap -- Local version numbers
+ UsagesMap -- Used when compiling this module
+ VersionsMap -- Version numbers of things from this module
ExportsMap -- Exported names
(Bag Module) -- Special instance modules
FixitiesMap -- fixities of local things
-----------------------------------------------------------------
data IfaceToken
= ITinterface -- keywords
+ | ITusages
| ITversions
| ITexports
| ITinstance_modules
keywordsFM = listToFM [
("interface", ITinterface)
+ ,("__usages__", ITusages)
,("__versions__", ITversions)
,("__exports__", ITexports)
,("__instance_modules__",ITinstance_modules)