aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Interface/Create.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Haddock/Interface/Create.hs')
-rw-r--r--src/Haddock/Interface/Create.hs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/Haddock/Interface/Create.hs b/src/Haddock/Interface/Create.hs
index f68004a6..80b5a970 100644
--- a/src/Haddock/Interface/Create.hs
+++ b/src/Haddock/Interface/Create.hs
@@ -30,6 +30,7 @@ import Control.Applicative
import Control.Monad
import qualified Data.Traversable as T
+import qualified SrcLoc
import GHC hiding (flags)
import HscTypes
import Name
@@ -107,6 +108,18 @@ createInterface tm flags modMap instIfaceMap = do
| OptPrune `elem` opts = prunedExportItems0
| otherwise = exportItems
+ let abbrevs =
+ case tm_renamed_source tm of
+ Nothing -> M.empty
+ Just (_,impDecls,_,_) ->
+ M.fromList $
+ mapMaybe (\(SrcLoc.L _ impDecl) -> do
+ abbrev <- ideclAs impDecl
+ return
+ (case ideclName impDecl of SrcLoc.L _ name -> name,
+ abbrev))
+ impDecls
+
return Interface {
ifaceMod = mdl,
ifaceOrigFilename = msHsFilePath ms,
@@ -124,6 +137,7 @@ createInterface tm flags modMap instIfaceMap = do
ifaceVisibleExports = visibleNames,
ifaceDeclMap = declMap,
ifaceSubMap = subMap,
+ ifaceModuleAbbrevs = abbrevs,
ifaceInstances = instances,
ifaceHaddockCoverage = coverage
}