aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Interface/Create.hs
diff options
context:
space:
mode:
authorDavid Waern <david.waern@gmail.com>2012-04-02 01:05:47 +0200
committerDavid Waern <david.waern@gmail.com>2012-04-02 01:05:47 +0200
commit4b82bad435e629c3cd65782c8ffb9bae8a7e16b4 (patch)
tree0cd22cdf721497454c10de78b37b2830d3901aea /src/Haddock/Interface/Create.hs
parent162364b177c3982c67c842d310aead45434a3760 (diff)
parent979ada5bc63cba38bf570f943a3666298879bdc9 (diff)
Merge http://code.haskell.org/~thielema/haddock/ into ghc-7.4
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 94575209..9f183432 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
@@ -106,6 +107,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,
@@ -123,6 +136,7 @@ createInterface tm flags modMap instIfaceMap = do
ifaceVisibleExports = visibleNames,
ifaceDeclMap = declMap,
ifaceSubMap = subMap,
+ ifaceModuleAbbrevs = abbrevs,
ifaceInstances = instances,
ifaceHaddockCoverage = coverage
}