Overlapped pattern warnings for lazy patterns
The compiler appears to disregard lazy patterns when producing overlapped-pattern warnings. Some detectable overlapped patterns are ignored as a result. For example, the following does not produce a warning:
f x = case x of Just ~1 -> 0 Just _ -> 1 Nothing -> 2
This function cannot return 1 because every value that satisfies the second pattern also satisfies the first.
I think the relevant instances of overlap could be captured by treating ~() patterns as wildcards for the purpose of detecting overlapped patterns.