[GHC] #11245: Non-exhaustive pattern, "Patterns not matched" list is empty
GHC
ghc-devs at haskell.org
Fri Dec 18 16:08:27 UTC 2015
#11245: Non-exhaustive pattern, "Patterns not matched" list is empty
-------------------------------------+-------------------------------------
Reporter: osa1 | Owner: gkaracha
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.11
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by goldfire):
I see your point about this not being a bug, but can't we have a better
error message? For example:
{{{
Exhaustive.hs:10:7: warning:
Pattern match(es) are non-exhaustive
In the definition for ‘a’: Cases not matched:
(Just i <- x), not (odd i)
}}}
Maybe it's hard to get that "cases not matched" so exactly, but at least
we can say vaguely that the guards are incomplete, instead of the error
suggesting that a list follows but then omitting the list.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11245#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list