diff options
author | simonmar <unknown> | 2003-07-30 16:05:41 +0000 |
---|---|---|
committer | simonmar <unknown> | 2003-07-30 16:05:41 +0000 |
commit | 17c3137f80b18c46755dabbdaa9588114662afee (patch) | |
tree | 09d96acd1e380810c2eb89521922573a56605dab /src/HaddockTypes.hs | |
parent | afcd30fcd5ac4d76ef805a636992978b5efc2ad7 (diff) |
[haddock @ 2003-07-30 16:05:40 by simonmar]
Rename instances based on the import_env for the module in which they
are to be displayed. This should give, in many cases, better links
for the types and classes mentioned in the instance head.
This involves keeping around the import_env in the iface until the
end, because instances are not collected up until all the modules have
been processed. Fortunately it doesn't seem to affect performance
much.
Instance heads are now attached to ExportDecls, rather than the HTML
backend passing around a separate mapping for instances. This is a
cleanup.
Diffstat (limited to 'src/HaddockTypes.hs')
-rw-r--r-- | src/HaddockTypes.hs | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/HaddockTypes.hs b/src/HaddockTypes.hs index cc6585bc..74916099 100644 --- a/src/HaddockTypes.hs +++ b/src/HaddockTypes.hs @@ -33,11 +33,15 @@ data Interface iface_env :: NameEnv, -- ^ environment mapping names to *original* names + iface_import_env :: FiniteMap HsQName HsQName, + iface_reexported :: NameEnv, - -- ^ For names exported by this module, but not actually documented - -- in this module's documentation (perhaps because they are reexported via - -- 'module M' in the export list), this mapping gives the location of - -- documentation for the name in another module. + -- ^ For names exported by this module, but not + -- actually documented in this module's documentation + -- (perhaps because they are reexported via 'module M' + -- in the export list), this mapping gives the + -- location of documentation for the name in another + -- module. iface_sub :: FiniteMap HsName [HsName], -- ^ maps names to "subordinate" names @@ -75,6 +79,7 @@ data ExportItem = ExportDecl HsQName -- the original name HsDecl -- a declaration (with doc annotations) + [InstHead] -- instances relevant to this declaration | ExportGroup -- a section heading Int -- section level (1, 2, 3, ... ) |