Ticket #29 (closed bug: invalid)
Check for exhaustive patterns is broken
| Reported by: | nobody | Owned by: | |
|---|---|---|---|
| Priority: | lowest | Milestone: | _|_ |
| Component: | Compiler | Version: | 5.02 |
| Keywords: | Cc: | ||
| Operating System: | Unknown/Multiple | Architecture: | Unknown/Multiple |
| Type of failure: | None/Unknown | Difficulty: | Unknown |
| Test Case: | Blocked By: | ||
| Blocking: | Related Tickets: |
Description (last modified by igloo) (diff)
When some of the patterns in a function definition or
case expression contain guards, the compiler gives
false warnings about non-exhaustive pattern matches. A
pity, because this kind of warning is very useful
indeed!
For example, I get
>ghc --make -Wall See.hs
ghc-5.02.1: chasing modules from: See.hs
Compiling See ( See.hs, ./See.o )
See.hs:17: Warning: Pattern match(es) are
non-exhaustive
In the definition of `insert':
Patterns not matched: _ _ (TREE _ _ _ _)
See.hs:41: Warning: Pattern match(es) are
non-exhaustive
In a case alternative EMPTY: Patterns not matched:
TREE _ _ _ _
for the attached file.
[I am not sure filling in the e-mail address box had
any effect on the last two complaints I submitted, so I
repeat my address here:
feliks@crt.se]
Change History
Note: See
TracTickets for help on using
tickets.
