[GHC] #13342: Core Lint warnings are emitted on stdout rather than stderr

GHC ghc-devs at haskell.org
Mon Mar 6 00:27:59 UTC 2017


#13342: Core Lint warnings are emitted on stdout rather than stderr
-------------------------------------+-------------------------------------
        Reporter:  mpickering        |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  low               |            Milestone:
       Component:  Compiler          |              Version:  8.0.1
      Resolution:                    |             Keywords:  newcomer
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by ThreeFx):

 Just a note: The culprit seems to be `displayLintResults` in
 `compiler/coreSyn/CoreLint.hs`. Using `log_action` with the severity
 `SevDump` writes the given text to `stdout`. By changing this to
 `SevWarning` it is written to `stderr` instead, although the error message
 is worse than before because it is even more redundant:

 {{{
 <no location info>: warning:
     *** Core Lint warnings : in result of Occurrence analysis ***
     test.hs:4:1: warning:
         [RHS of f :: [()] -> [()]]
         INLINE binder is (non-rule) loop breaker: f
 }}}

 Since linting `Core` is a compiler developer thing 99% of the time, IMO it
 is more important to print concise and clear error messages/warnings than
 to write to the correct output (the first line overshadows the linting
 error). But these are just my 2 cents.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13342#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list