1 Dec 2005 21:56
-fwarn-incomplete-patterns, not always warns
Neil Mitchell <ndmitchell <at> gmail.com>
2005-12-01 20:56:29 GMT
2005-12-01 20:56:29 GMT
Hi,
I have been playing around with -fwarn-incomplete-patterns under GHC
6.4.1 on Windows.
-- no warning
ex1 x = ss
where (s:ss) = x
-- no warning
ex2 x = let (s:ss) = x in ss
-- Warning: Pattern match(es) are non-exhaustive
-- In a case alternative: Patterns not matched: []
ex3 x = case x of ~(s:ss) -> ss
I have translated all 3 functions using the rules supplied in the
Haskell 98 report, so they all have the same meaning, but only one
gives an error. Is it intentional to ignore where/let pattern matches?
Thanks
Neil
RSS Feed