[commit: ghc] master: Emit Core lint warnings on stderr, fix #13342 (7b095b9)

git at git.haskell.org git at git.haskell.org
Sat Mar 11 19:47:23 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/7b095b991879b29b26fce9e9d4accd3ba9366dc0/ghc

>---------------------------------------------------------------

commit 7b095b991879b29b26fce9e9d4accd3ba9366dc0
Author: Ben Fiedler <ben at sjfiedler.de>
Date:   Tue Mar 7 01:48:24 2017 +0100

    Emit Core lint warnings on stderr, fix #13342


>---------------------------------------------------------------

7b095b991879b29b26fce9e9d4accd3ba9366dc0
 compiler/coreSyn/CoreLint.hs | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/compiler/coreSyn/CoreLint.hs b/compiler/coreSyn/CoreLint.hs
index 93fcbe4..fb86242 100644
--- a/compiler/coreSyn/CoreLint.hs
+++ b/compiler/coreSyn/CoreLint.hs
@@ -318,9 +318,11 @@ displayLintResults dflags pass warns errs binds
   | not (isEmptyBag warns)
   , not (hasNoDebugOutput dflags)
   , showLintWarnings pass
-  = log_action dflags dflags NoReason Err.SevDump noSrcSpan
+  -- If the Core linter encounters an error, output to stderr instead of
+  -- stdout (#13342)
+  = log_action dflags dflags NoReason Err.SevInfo noSrcSpan
         (defaultDumpStyle dflags)
-        (lint_banner "warnings" (ppr pass) $$ Err.pprMessageBag warns)
+        (lint_banner "warnings" (ppr pass) $$ Err.pprMessageBag (mapBag ($$ blankLine) warns))
 
   | otherwise = return ()
   where



More information about the ghc-commits mailing list