HPC interaction with -Wall leading to spurious pattern match warnings
Without -fhpc, the following program passes the pattern match checker:
f :: String -> Int
f x | null x = 1
| otherwise = 2
main :: IO ()
main = print $ f []
However, with -fhpc on, we get the spurious warning:
A.hs:3:0:
Warning: Pattern match(es) are non-exhaustive
In the definition of `f': Patterns not matched: _
Causing libraries using -Werror to fail to build when using -fhpc. }}}
-- Don
Trac metadata
Trac field | Value |
---|---|
Version | 6.8 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | low |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | dons@galois.com |
Operating system | Unknown |
Architecture | Unknown |