[project @ 2001-03-12 14:06:46 by simonpj]
[ghc-hetmet.git] / ghc / compiler / main / ErrUtils.lhs
index a566b6e..a262bd6 100644 (file)
@@ -13,7 +13,9 @@ module ErrUtils (
        printErrorsAndWarnings, pprBagOfErrors, pprBagOfWarnings,
 
        ghcExit,
-       doIfSet, doIfSet_dyn, dumpIfSet, dumpIfSet_core, dumpIfSet_dyn, showPass
+       doIfSet, doIfSet_dyn, 
+       dumpIfSet, dumpIfSet_core, dumpIfSet_dyn, dumpIfSet_dyn_or, 
+       showPass
     ) where
 
 #include "HsVersions.h"
@@ -141,6 +143,13 @@ dumpIfSet_dyn dflags flag hdr doc
   | dopt flag dflags || verbosity dflags >= 4 = printDump (dump hdr doc)
   | otherwise                                 = return ()
 
+dumpIfSet_dyn_or :: DynFlags -> [DynFlag] -> String -> SDoc -> IO ()
+dumpIfSet_dyn_or dflags flags hdr doc
+  | or [dopt flag dflags | flag <- flags]
+  || verbosity dflags >= 4 
+  = printDump (dump hdr doc)
+  | otherwise = return ()
+
 dump hdr doc 
    = vcat [text "", 
           line <+> text hdr <+> line,