[GHC] #10021: Add "Error:" prefix for error-messages
GHC
ghc-devs at haskell.org
Tue Jan 27 17:08:30 UTC 2015
#10021: Add "Error:" prefix for error-messages
-------------------------------------+-------------------------------------
Reporter: k-bx | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: 7.12.1
Component: Compiler | Version: 7.8.4
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: None/Unknown | Unknown/Multiple
Blocked By: | Test Case:
Related Tickets: | Blocking:
| Differential Revisions:
-------------------------------------+-------------------------------------
Description changed by k-bx:
Old description:
> Similar to what we have for "Warning:".
>
> E.g., we have:
>
> {{{
> ➜ cat test.hs
> main = putStrLn "Hello!"
> ➜ ghc --make -fforce-recomp -Wall ./test.hs
> [1 of 1] Compiling Main ( test.hs, test.o )
>
> test.hs:1:1: Warning:
> Top-level binding with no type signature: main :: IO ()
> Linking test ...
> ➜ cat test2.hs
> main = foo
> ➜ ghc --make -fforce-recomp -Wall ./test2.hs
> [1 of 1] Compiling Main ( test2.hs, test2.o )
>
> test2.hs:1:8: Not in scope: ‘foo’
> }}}
>
> And I propose having:
>
> {{{
> ➜ cat test2.hs
> main = foo
> ➜ ghc --make -fforce-recomp -Wall ./test2.hs
> [1 of 1] Compiling Main ( test2.hs, test2.o )
>
> test2.hs:1:8: Error: Not in scope: ‘foo’
> }}}
New description:
Similar to what we have for "Warning:".
E.g., we have:
{{{
➜ cat test.hs
main = putStrLn "Hello!"
➜ ghc --make -fforce-recomp -Wall ./test.hs
[1 of 1] Compiling Main ( test.hs, test.o )
test.hs:1:1: Warning:
Top-level binding with no type signature: main :: IO ()
Linking test ...
➜ cat test2.hs
main = foo
➜ ghc --make -fforce-recomp -Wall ./test2.hs
[1 of 1] Compiling Main ( test2.hs, test2.o )
test2.hs:1:8: Not in scope: ‘foo’
}}}
And I propose having:
{{{
➜ cat test2.hs
main = foo
➜ ghc --make -fforce-recomp -Wall ./test2.hs
[1 of 1] Compiling Main ( test2.hs, test2.o )
test2.hs:1:8: Error: Not in scope: ‘foo’
}}}
== Motivation ==
Main motivation point right now is that there's a ticket #9219 (parallel
build's output of errors doesn't occur at the end of output), due to
which, error-reporting of your program might get lost somewhere in the
middle of a build-log. As another example, if your program has a lot of
warnings, and you build it with multiple cores, you almost always get an
error lost somewhere in the middle of warnings and it's almost impossible
to find.
So, this feature's main purpose is to ease navigation in textual output of
ghc in order to find errors quickly, not being tied to output ordering.
== Disadvantages ==
Many regression tests might need a fix.
--
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10021#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list