[GHC] #7397: -fwarn-irrefutable-patterns
GHC
cvs-ghc at haskell.org
Wed Nov 7 12:56:47 CET 2012
#7397: -fwarn-irrefutable-patterns
-----------------------------+----------------------------------------------
Reporter: chrisdone | Owner:
Type: feature request | Status: new
Priority: normal | Component: Compiler
Version: 7.6.1 | Keywords:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
Failure: None/Unknown | Blockedby:
Blocking: | Related:
-----------------------------+----------------------------------------------
Comment(by guest):
I think you're searching for -fwarn-incomplete-uni-patterns.
You get a warning on:
{{{
data Query = GetTheStuff Int | B
foo :: Query -> Int
foo x = 0 where
GetTheStuff n = x
}}}
However, experimenting with this I found a bug. If I replace "GetTheStuff
n = x" with "GetTheStuff _ = x" the warning disappears.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7397#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list