Opened 5 years ago

Last modified 3 years ago

#10600 closed bug

-fwarn-incomplete-patterns doesn't work with -fno-code — at Initial Version

Reported by: akio Owned by:
Priority: normal Milestone: 8.4.1
Component: Compiler Version: 7.10.1
Keywords: Cc: duog
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Incorrect warning at compile-time Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


-fwarn-incomplete-patterns doensn't seem to generate any warnings when -fno-code is specified.

To reproduce, save this module as foo.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 )

Change History (0)

Note: See TracTickets for help on using tickets.