From ca90e10eab9c938f211ce5e83ae0e8c15222a958 Mon Sep 17 00:00:00 2001 From: David Waern Date: Fri, 2 Jan 2009 21:38:27 +0000 Subject: Show re-exported names from external packages again This fixes GHC ticket 2746. In order to also link to the exported subordinate names of a declaration, we need to re-introduce the sub map in the .haddock files. --- src/Haddock/Types.hs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/Haddock/Types.hs') diff --git a/src/Haddock/Types.hs b/src/Haddock/Types.hs index c10cfee7..b47444b7 100644 --- a/src/Haddock/Types.hs +++ b/src/Haddock/Types.hs @@ -56,11 +56,7 @@ data ExportItem name } -- ^ An exported declaration | ExportNoDecl { - -- | The original name - expItemName :: Name, - - -- | Where to link to - expItemLinkTarget :: name, + expItemName :: name, -- | Subordinate names expItemSubs :: [name] @@ -89,6 +85,7 @@ data ExportItem name type InstHead name = ([HsPred name], name, [HsType name]) type ModuleMap = Map Module Interface +type InstIfaceMap = Map Module InstalledInterface type DocMap = Map Name (HsDoc DocName) type LinkEnv = Map Name Module @@ -136,6 +133,7 @@ data Interface = Interface { ifaceDeclMap :: Map Name DeclInfo, ifaceRnDocMap :: Map Name (HsDoc DocName), + ifaceSubMap :: Map Name [Name], ifaceExportItems :: ![ExportItem Name], ifaceRnExportItems :: [ExportItem DocName], @@ -168,7 +166,8 @@ data InstalledInterface = InstalledInterface { instDocMap :: Map Name (HsDoc DocName), instExports :: [Name], instVisibleExports :: [Name], - instOptions :: [DocOption] + instOptions :: [DocOption], + instSubMap :: Map Name [Name] } @@ -180,7 +179,8 @@ toInstalledIface interface = InstalledInterface { instDocMap = ifaceRnDocMap interface, instExports = ifaceExports interface, instVisibleExports = ifaceVisibleExports interface, - instOptions = ifaceOptions interface + instOptions = ifaceOptions interface, + instSubMap = ifaceSubMap interface } -- cgit v1.2.3