Give the "Failing due to -Werror" message a name.
authorThomas Schilling <nominolo@googlemail.com>
Sun, 14 Sep 2008 17:39:04 +0000 (17:39 +0000)
committerThomas Schilling <nominolo@googlemail.com>
Sun, 14 Sep 2008 17:39:04 +0000 (17:39 +0000)
compiler/main/ErrUtils.lhs

index bc5908f..a0325bf 100644 (file)
@@ -15,6 +15,7 @@ module ErrUtils (
        mkErrMsg, mkPlainErrMsg, mkLongErrMsg, mkWarnMsg, mkPlainWarnMsg,
        printErrorsAndWarnings, printBagOfErrors, printBagOfWarnings,
     handleFlagWarnings,
+       warnIsErrorMsg,
 
        ghcExit,
        doIfSet, doIfSet_dyn, 
@@ -144,6 +145,9 @@ type ErrorMessages   = Bag ErrMsg
 emptyMessages :: Messages
 emptyMessages = (emptyBag, emptyBag)
 
+warnIsErrorMsg :: ErrMsg
+warnIsErrorMsg = mkPlainErrMsg noSrcSpan (text "\nFailing due to -Werror.\n")
+
 errorsFound :: DynFlags -> Messages -> Bool
 -- The dyn-flags are used to see if the user has specified
 -- -Werror, which says that warnings should be fatal