[GHC] #14954: Passing -fno-code disables reporting of some warnings
GHC
ghc-devs at haskell.org
Wed Mar 21 08:41:38 UTC 2018
#14954: Passing -fno-code disables reporting of some warnings
-------------------------------------+-------------------------------------
Reporter: mrkkrp | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.2.2
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
Here is how to reproduce the issue with GHC 8.2.2:
{{{
$ cat Main.hs
module Main (main) where
main =
case (1+1) :: Int of
1 -> return ()
$ ghc -Wall -Werror -fno-code Main.hs
[1 of 1] Compiling Main ( Main.hs, nothing )
Main.hs:3:1: warning: [-Wmissing-signatures]
Top-level binding with no type signature: main :: IO ()
|
3 | main =
| ^^^^
<no location info>: error:
Failing due to -Werror.
$ ghc -Wall -Werror Main.hs
[1 of 1] Compiling Main ( Main.hs, Main.o )
Main.hs:3:1: warning: [-Wmissing-signatures]
Top-level binding with no type signature: main :: IO ()
|
3 | main =
| ^^^^
Main.hs:4:3: warning: [-Wincomplete-patterns]
Pattern match(es) are non-exhaustive
In a case alternative:
Patterns not matched: p where p is not one of {1}
|
4 | case (1+1) :: Int of
| ^^^^^^^^^^^^^^^^^^^^...
<no location info>: error:
Failing due to -Werror.
}}}
Note that `missing-signature` is reported both times, but the `incomplete-
patterns` is not reported with `-fno-code`.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14954>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list