[GHC] #11390: GHC does not warn about redundant patterns
GHC
ghc-devs at haskell.org
Mon Jan 11 17:31:58 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,
| PatternMatchWarnings
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 agree with George (gkaracha). `sillyId x = x` can't be called on a
value, but Haskell isn't call-by-value. I will use `Void` instead of `F1
Char`, because the type family bit isn't the interesting part here.
{{{
silly1 :: Void -> Void
silly1 x = x
silly2 :: Void -> Void
silly2 x = error "urk"
}}}
`silly1 undefined` and `silly2 undefined` have different runtime behavior;
the pattern is not redundant.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11390#comment:12>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list