aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Interface/Rename.hs
diff options
context:
space:
mode:
authorDavid Waern <david.waern@gmail.com>2008-04-11 17:24:00 +0000
committerDavid Waern <david.waern@gmail.com>2008-04-11 17:24:00 +0000
commita75db99a9c2fb5b22a65c0a5b030c855dd1d8cba (patch)
tree22c06bb487be0a601b0e374d424890e34b0be8f9 /src/Haddock/Interface/Rename.hs
parent9a21555c26c61cf3bb9b5353a838bf147816dad9 (diff)
Add a flag for turning off all warnings
Diffstat (limited to 'src/Haddock/Interface/Rename.hs')
-rw-r--r--src/Haddock/Interface/Rename.hs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Haddock/Interface/Rename.hs b/src/Haddock/Interface/Rename.hs
index 11a0a14c..5ce6aa24 100644
--- a/src/Haddock/Interface/Rename.hs
+++ b/src/Haddock/Interface/Rename.hs
@@ -29,8 +29,8 @@ import Control.Arrow
import Control.Monad hiding (mapM)
-renameInterface :: LinkEnv -> Interface -> ErrMsgM Interface
-renameInterface renamingEnv mod =
+renameInterface :: LinkEnv -> Bool -> Interface -> ErrMsgM Interface
+renameInterface renamingEnv warnings mod =
-- first create the local env, where every name exported by this module
-- is mapped to itself, and everything else comes from the global renaming
@@ -66,10 +66,10 @@ renameInterface renamingEnv mod =
in do
-- report things that we couldn't link to. Only do this for non-hidden
-- modules.
- when (OptHide `notElem` ifaceOptions mod && not (null strings)) $
- tell ["Warning: " ++ show (ppr (ifaceMod mod) defaultUserStyle) ++
- ": could not find link destinations for:\n"++
- " " ++ concat (map (' ':) strings) ]
+ unless (OptHide `elem` ifaceOptions mod || null strings || not warnings) $
+ tell ["Warning: " ++ show (ppr (ifaceMod mod) defaultUserStyle) ++
+ ": could not find link destinations for:\n"++
+ " " ++ concat (map (' ':) strings) ]
return $ mod { ifaceRnDoc = finalModuleDoc,
ifaceRnDocMap = rnDocMap,