#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
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to