
#10106: GHC doesn't warn on typos in language pragmas -------------------------------------+------------------------------------- Reporter: sdemos | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.4 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 Type of failure: Incorrect | (amd64) warning at compile-time | Test Case: Blocked By: | Blocking: Related Tickets: #10076 | Differential Revisions: -------------------------------------+------------------------------------- Comment (by simonpj): The underlying issue here is: * A "warning" differs from an "error", in that only the latter halt compilation (unless you use `-Werror`. * We do not display warnings if there are any errors, to draw attention to the errors. Maybe we need some kind of in-between thing, say a "prominent warning". It is like a warning in that it does not halt compilation. But it is not suppressed by errors. Then a mis-spelled pragma could be a "prominent warning". Bizarrely, we currently have no fewer than '''seven''' levels of severity for output messages: {{{ data Severity = SevOutput | SevDump | SevInteractive | SevInfo | SevWarning | SevError | SevFatal }}} (in `Error.hs`). The intended semantics of these levels is entirely undocumented, and I have no clue what they mean. I would love this to documented; probably we can nuke several levels. But adding `SevProminentWarning` (properly documented) would arguably do little harm. But someone would have to want to do it. Simon -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10106#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler