diff options
author | David Waern <david.waern@gmail.com> | 2012-05-15 01:46:35 +0200 |
---|---|---|
committer | David Waern <david.waern@gmail.com> | 2012-05-15 01:46:35 +0200 |
commit | 23009e2f7655103bbc816eceff0395e1aaeb2324 (patch) | |
tree | b00efbcd4929e38955a65825ab324f9a74383371 /src/Haddock/Interface/LexParseRn.hs | |
parent | 4b82bad435e629c3cd65782c8ffb9bae8a7e16b4 (diff) | |
parent | e4eceaeeb6e99ef9349fe7e99d2ab4d152f96484 (diff) |
Merge branch 'ghc-7.4' of http://darcs.haskell.org/haddock into ghc-7.4
Diffstat (limited to 'src/Haddock/Interface/LexParseRn.hs')
-rw-r--r-- | src/Haddock/Interface/LexParseRn.hs | 8 |
1 files changed, 4 insertions, 4 deletions
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) |