strange behaviour of -fwarn-incomplete-uni-patterns
For the following program (attached):
module Pat where
w :: String
w = let (_:_) = ["1", "2", "3"] in "1"
w2 :: String
w2 = let (_a:_b) = ["1", "2", "3"] in "1"
the following warnings are generated (note line numbers)
mikolaj@bratek:~/waste$ ghc --make pat.hs -fwarn-incomplete-uni-patterns
[1 of 1] Compiling Patwhere ( pat.hs, pat.o )
pat.hs:7:10:
Warning: Pattern match(es) are non-exhaustive
In a pattern binding: Patterns not matched: []
pat.hs:7:10:
Warning: Pattern match(es) are non-exhaustive
In a pattern binding: Patterns not matched: []
mikolaj@bratek:~/waste$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.3.20110808
Trac metadata
Trac field | Value |
---|---|
Version | 7.3 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |