[GHC] #10600: -fwarn-incomplete-patterns doesn't work with -fno-code

GHC ghc-devs at haskell.org
Fri Jul 3 07:23:36 UTC 2015


#10600: -fwarn-incomplete-patterns doesn't work with -fno-code
-------------------------------------+-------------------------------------
              Reporter:  akio        |             Owner:
                  Type:  bug         |            Status:  new
              Priority:  normal      |         Milestone:
             Component:  Compiler    |           Version:  7.10.1
              Keywords:              |  Operating System:  Unknown/Multiple
          Architecture:              |   Type of failure:  Incorrect
  Unknown/Multiple                   |  warning at compile-time
             Test Case:              |        Blocked By:
              Blocking:              |   Related Tickets:
Differential Revisions:              |
-------------------------------------+-------------------------------------
 `-fwarn-incomplete-patterns` doensn't seem to generate any warnings when
 `-fno-code` is specified.

 To reproduce, save this module as `foo.hs`.

 {{{#!hs
 module Foo where
 foo True = 4
 }}}

 and compile with `-fwarn-incomplete-patterns`, with and without `-fno-
 code`.

 {{{
 % ghc -fwarn-incomplete-patterns -fforce-recomp foo.hs
 [1 of 1] Compiling Foo              ( foo.hs, foo.o )

 foo.hs:2:1: Warning:
     Pattern match(es) are non-exhaustive
     In an equation for ‘foo’: Patterns not matched: False
 % ghc -fwarn-incomplete-patterns -fforce-recomp -fno-code foo.hs
 [1 of 1] Compiling Foo              ( foo.hs, nothing )
 %
 }}}

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


More information about the ghc-tickets mailing list