
Yitzchak,
Sorry, I didn't get what you mean. Do you mean `error` [0] function from
Prelude? The discussion is currently not regarding runtime program
behavior, nor it is about `error` function. It's rather regarding compiler
output message on compilation failure, so it shouldn't get mixed with your
program's runtime behavior in any way. See ticket #10021 [1] for examples
of what I'm talking about (I'm adding "motivation" section right now).
[0]:
http://hackage.haskell.org/package/base-4.7.0.2/docs/Prelude.html#v:error
[1]: https://ghc.haskell.org/trac/ghc/ticket/10021#modify
On Tue, Jan 27, 2015 at 6:49 PM, Yitzchak Gale
-1
There are common idioms that rely on the current behavior, so I think this would break a lot code.
Examples:
In command line programs, it is very common to use "error" for printing the usage message.
Many programs use "error" as a general way to exit from pure code with a message.
I'm not commenting about whether or not those are good practice, just reporting that they are out there.
I would be in favor of this though if it is off by default and is turned on by an option or pragma. But not just -Werror, though, except for messages that would otherwise have been prefixed by "Warning", like the current behavior.
Thanks, Yitz
On Fri, Jan 23, 2015 at 1:04 PM, Konstantine Rybnikov
wrote: Hi!
I'm bringing this up once again. Can we add "Error:" in the output of an error in a similar way ghc shows "Warning:" for warnings? Main reasoning is that, for example, on a build-server, where you have lots of cores to build your program, if you get an error, it gets lost somewhere in the middle of compiler's output in all other "Warning" messages you get, since error is not always shown last on multi-core build.
Thanks.
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs