[GHC] #10600: -fwarn-incomplete-patterns doesn't work with -fno-code
GHC
ghc-devs at haskell.org
Tue Sep 29 14:55:05 UTC 2015
#10600: -fwarn-incomplete-patterns doesn't work with -fno-code
-------------------------------------+-------------------------------------
Reporter: akio | Owner: ezyang
Type: bug | Status: patch
Priority: normal | Milestone: 8.0.1
Component: Compiler | Version: 7.10.1
Resolution: | Keywords: newcomer
Operating System: Unknown/Multiple | Architecture:
Type of failure: Incorrect | Unknown/Multiple
warning at compile-time | Test Case: driver/T8101b
Blocked By: | Blocking:
Related Tickets: #8101 | Differential Rev(s): Phab:D1278
-------------------------------------+-------------------------------------
Changes (by bgamari):
* status: new => patch
Old description:
> `-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 )
> %
> }}}
New description:
`-fwarn-incomplete-patterns` doesn'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#comment:13>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list