aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Interface
diff options
context:
space:
mode:
authorSimon Hengel <sol@typeful.net>2012-10-14 16:03:43 +0200
committerSimon Hengel <sol@typeful.net>2012-10-14 16:03:43 +0200
commit37a4e2c3b71280fdee7b217dd9ddff090ed34873 (patch)
tree892a56b3f2cd178f7dc1d87eeca6d081f05c0b56 /src/Haddock/Interface
parent4334a1657865b5a745ac0e8c56de4318fcd54bac (diff)
Properly handle deprecation messages for re-exported things (fixes #220)
Diffstat (limited to 'src/Haddock/Interface')
-rw-r--r--src/Haddock/Interface/Create.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Haddock/Interface/Create.hs b/src/Haddock/Interface/Create.hs
index 2ffe8de8..6c121ad4 100644
--- a/src/Haddock/Interface/Create.hs
+++ b/src/Haddock/Interface/Create.hs
@@ -92,7 +92,9 @@ createInterface tm flags modMap instIfaceMap = do
warningMap <- liftErrMsg $ mkWarningMap dflags warnings gre exportedNames
- exportItems <- mkExportItems modMap mdl warningMap gre exportedNames decls maps exports
+ let allWarnings = M.unions (warningMap : map ifaceWarningMap (M.elems modMap))
+
+ exportItems <- mkExportItems modMap mdl allWarnings gre exportedNames decls maps exports
instances instIfaceMap dflags
let !visibleNames = mkVisibleNames exportItems opts
@@ -135,6 +137,7 @@ createInterface tm flags modMap instIfaceMap = do
, ifaceModuleAliases = aliases
, ifaceInstances = instances
, ifaceHaddockCoverage = coverage
+ , ifaceWarningMap = warningMap
}
mkAliasMap :: DynFlags -> Maybe RenamedSource -> M.Map Module ModuleName
@@ -170,8 +173,6 @@ lookupModuleDyn dflags Nothing mdlName =
-- Warnings
-------------------------------------------------------------------------------
-type WarningMap = DocMap Name
-
mkWarningMap :: DynFlags -> Warnings -> GlobalRdrEnv -> [Name] -> ErrMsgM WarningMap
mkWarningMap dflags warnings gre exps = case warnings of
NoWarnings -> return M.empty