diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2012-11-26 12:07:37 +0000 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2012-11-26 12:07:57 +0000 |
commit | 1135c8439e606b2b0cebd138afbb4c5716f3abcc (patch) | |
tree | 069e73b7686d6690d6d2bd41fff97674ae783e02 /compiler/main | |
parent | c8f4f50983bbb26b2d753e56ba61f5a307ff412f (diff) | |
download | haskell-1135c8439e606b2b0cebd138afbb4c5716f3abcc.tar.gz |
Improve kind inference for tuple types
Trac #7410 pointed out a terrible error message, which is
much improved by this patch.
Diffstat (limited to 'compiler/main')
-rw-r--r-- | compiler/main/ErrUtils.lhs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/main/ErrUtils.lhs b/compiler/main/ErrUtils.lhs index 776382ecc3..e0d6a9643e 100644 --- a/compiler/main/ErrUtils.lhs +++ b/compiler/main/ErrUtils.lhs @@ -12,7 +12,7 @@ module ErrUtils ( MsgDoc, mkLocMessage, pprMessageBag, pprErrMsgBag, pprErrMsgBagWithLoc, pprLocErrMsg, makeIntoWarning, - errorsFound, emptyMessages, + errorsFound, emptyMessages, isEmptyMessages, mkErrMsg, mkPlainErrMsg, mkLongErrMsg, mkWarnMsg, mkPlainWarnMsg, printBagOfErrors, warnIsErrorMsg, mkLongWarnMsg, @@ -136,6 +136,9 @@ mkPlainWarnMsg dflags locn msg = mk_err_msg dflags SevWarning locn emptyMessages :: Messages emptyMessages = (emptyBag, emptyBag) +isEmptyMessages :: Messages -> Bool +isEmptyMessages (warns, errs) = isEmptyBag warns && isEmptyBag errs + warnIsErrorMsg :: DynFlags -> ErrMsg warnIsErrorMsg dflags = mkPlainErrMsg dflags noSrcSpan (text "\nFailing due to -Werror.") |