Minor problem with the check for incomplete patterns:
Under ghc-2.02, the following program gives a warning about
"Possibly incomplete patterns in the definition of function `f'"
even though the patterns clearly are complete.
module Test (f) where
f (x:_) _ = x
f _ (x:_) = x
f [] [] = error "both empty"
Replacing the second line of f with
f [] (x:_) = x
eliminates the warning.
Since this is a warning rather than an error, and since the warning message
does clearly indicate that it might be wrong (by saying "Possibly"), this
is merely an annoyance rather than a serious problem. Still, if the compiler
is going to get this wrong, you would expect it to be on a harder example
than this.
Chris