[GHC] #4139: Spurious non-exhaustive pattern match warnings are
given using GADTs
GHC
cvs-ghc at haskell.org
Tue Sep 21 23:35:56 EDT 2010
#4139: Spurious non-exhaustive pattern match warnings are given using GADTs
---------------------------+------------------------------------------------
Reporter: blarsen | Owner: simonpj
Type: bug | Status: closed
Priority: normal | Milestone: 7.0.1
Component: Compiler | Version: 6.12.3
Resolution: invalid | Keywords: GADTs, warnings, pattern matching
Testcase: | Blockedby:
Difficulty: | Os: Unknown/Multiple
Blocking: | Architecture: Unknown/Multiple
Failure: None/Unknown |
---------------------------+------------------------------------------------
Comment(by blarsen):
Replying to [comment:2 simonpj]:
> Now I look at your example, I see that your claim isn't true! Consider
> {{{
> evalFst (Const (undefined :: Const (Int,Int))
> }}}
> That will hit the allegedly impossible alternative.
>
> So in this case GHC is quite right. (The pattern match warnings are not
all correct, but this one is, I think.)
>
> Simon
Indeed! I had forgotten about undefined / bottom values.
Brad
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4139#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list