[GHC] #11390: GHC does not warn about redundant patterns
GHC
ghc-devs at haskell.org
Sat Jan 9 17:09:07 UTC 2016
#11390: GHC does not warn about redundant patterns
-------------------------------------+-------------------------------------
Reporter: Iceland_jack | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.1
Resolution: | Keywords: warnings
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 rwbarton):
Empty data declarations are Haskell 2010, so it doesn't seem reasonable to
give a warning that suggests something outside the Haskell 2010 language.
If EmptyCase is already on, though, it could make sense to issue a warning
in your second example.
I don't understand your first example. Isn't the clause `sillyId x = case
x of {}` just as "redundant" as the clause `sillyId x = x` was in the
first place?
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11390#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list