[project @ 2000-11-21 09:30:16 by simonpj]
[ghc-hetmet.git] / ghc / compiler / main / ErrUtils.lhs
index b0e0b3a..8267c93 100644 (file)
@@ -5,7 +5,7 @@
 
 \begin{code}
 module ErrUtils (
-       ErrMsg, WarnMsg, Message, Messages, errorsFound,
+       ErrMsg, WarnMsg, Message, Messages, errorsFound, warningsFound,
 
        addShortErrLocLine, addShortWarnLocLine,
        addErrLocHdrLine, dontAddErrLoc,
@@ -67,6 +67,9 @@ type Messages = (Bag WarnMsg, Bag ErrMsg)
 errorsFound :: Messages -> Bool
 errorsFound (warns, errs) = not (isEmptyBag errs)
 
+warningsFound :: Messages -> Bool
+warningsFound (warns, errs) = not (isEmptyBag warns)
+
 printErrorsAndWarnings :: PrintUnqualified -> Messages -> IO ()
        -- Don't print any warnings if there are errors
 printErrorsAndWarnings unqual (warns, errs)