-fwarn-incomplete-patterns, not always warns

1 Dec
2005
1 Dec
'05
3:56 p.m.
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
7110
Age (days ago)
7110
Last active (days ago)
0 comments
1 participants
participants (1)
-
Neil Mitchell