aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES18
-rw-r--r--src/Haddock/Interface/Create.hs3
-rw-r--r--src/Haddock/Interface/LexParseRn.hs8
3 files changed, 24 insertions, 5 deletions
diff --git a/CHANGES b/CHANGES
index 76ac96e2..8af677a4 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,21 @@
+Changes in version 2.11.0
+
+ * Show deprecation messages for identifiers
+
+ * List identifiers declared on the same line (with a common type) separately
+
+ * Don't crash on unicode strings in doc comments
+
+ * Fix reporting of modules safe haskell mode
+
+ * Fix a case where we were generating invalid xhtml
+
+ * Better behaviour of the --qual option (no crashes, proper error messages)
+
+ * The Haddock API restores GHC's static flags after invocation
+
+ * Access to unexported identifiers through the Haddock API again
+
Changes in version 2.10.0
* Require GHC >= 7.4
diff --git a/src/Haddock/Interface/Create.hs b/src/Haddock/Interface/Create.hs
index a0bfde42..ea4636fe 100644
--- a/src/Haddock/Interface/Create.hs
+++ b/src/Haddock/Interface/Create.hs
@@ -50,6 +50,7 @@ createInterface tm flags modMap instIfaceMap = do
let ms = pm_mod_summary . tm_parsed_module $ tm
mi = moduleInfo tm
+ safety = modInfoSafe mi
mdl = ms_mod ms
dflags = ms_hspp_opts ms
instances = modInfoInstances mi
@@ -72,7 +73,7 @@ createInterface tm flags modMap instIfaceMap = do
| otherwise = opts0
(info, mbDoc) <- do
- (i, d) <- liftErrMsg $ processModuleHeader dflags gre mayDocHeader
+ (i, d) <- liftErrMsg $ processModuleHeader dflags gre safety mayDocHeader
return (i, addModuleWarning warnings d)
let declsWithDocs = topDecls group_
diff --git a/src/Haddock/Interface/LexParseRn.hs b/src/Haddock/Interface/LexParseRn.hs
index 61f5d6ac..56ed1b42 100644
--- a/src/Haddock/Interface/LexParseRn.hs
+++ b/src/Haddock/Interface/LexParseRn.hs
@@ -64,8 +64,9 @@ process parse dflags gre (HsDocString fs) = do
Just doc -> return (Just (rename gre doc))
-processModuleHeader :: DynFlags -> GlobalRdrEnv -> Maybe LHsDocString -> ErrMsgM (HaddockModInfo Name, Maybe (Doc Name))
-processModuleHeader dflags gre mayStr = do
+processModuleHeader :: DynFlags -> GlobalRdrEnv -> SafeHaskellMode -> Maybe LHsDocString
+ -> ErrMsgM (HaddockModInfo Name, Maybe (Doc Name))
+processModuleHeader dflags gre safety mayStr = do
(hmi, doc) <-
case mayStr of
Nothing -> return failure
@@ -79,8 +80,7 @@ processModuleHeader dflags gre mayStr = do
let hmi' = hmi { hmi_description = rename gre <$> hmi_description hmi }
doc' = rename gre doc
return (hmi', Just doc')
- let safety = Just $ showPpr $ safeHaskell dflags
- return (hmi { hmi_safety = safety }, doc)
+ return (hmi { hmi_safety = Just $ showPpr safety }, doc)
where
failure = (emptyHaddockModInfo, Nothing)