-fwarn-incomplete-patterns doesn't work with -fno-code
-fwarn-incomplete-patterns
doesn'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 )
%
Edited by Ben Gamari