Ticket #7669 (new bug)
Empty case causes warning
| Reported by: | goldfire | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 7.8.1 |
| Component: | Compiler | Version: | 7.7 |
| Keywords: | EmptyCase | Cc: | |
| Operating System: | Unknown/Multiple | Architecture: | Unknown/Multiple |
| Type of failure: | Incorrect warning at compile-time | Difficulty: | Unknown |
| Test Case: | deSugar/should_compile/T7669 | Blocked By: | |
| Blocking: | Related Tickets: |
Description
The following code
{-# LANGUAGE EmptyCase #-}
{-# OPTIONS_GHC -fwarn-incomplete-patterns #-}
data Void
foo :: Void -> ()
foo x = case x of {}
causes this warning
/Users/rae/temp/Scratch.hs:6:9: Warning:
Pattern match(es) are non-exhaustive
In a case alternative: Patterns not matched:
Ok, modules loaded: Main.
Change History
Note: See
TracTickets for help on using
tickets.
