[GHC] #5724: Confusing warning message for incomplete patterns
GHC
cvs-ghc at haskell.org
Sun Dec 25 03:19:01 CET 2011
#5724: Confusing warning message for incomplete patterns
------------------------------+---------------------------------------------
Reporter: AntoineLatter | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler
Version: 7.3 | Keywords:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
Failure: None/Unknown | Testcase:
Blockedby: | Blocking:
Related: |
------------------------------+---------------------------------------------
The following code
{{{
{-# OPTIONS_GHC -Wall #-}
import Data.Word
f :: Word8 -> Bool
f 0 = True
f 1 = False
f 2 = True
}}}
Produces the warning
{{{
7:1:
Warning: Pattern match(es) are non-exhaustive
In an equation for `f':
Patterns not matched: #x with #x `notElem` [0#, 1#, 2#]
}}}
While accurate, this is not exactly user friendly.
Found in GHC 7.4.1 RC 1
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5724>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list