#7669: Empty case causes warning
----------------------------------------------+-----------------------------
Reporter:  goldfire                           |          Owner:                 
 
    Type:  bug                                |         Status:  new            
 
Priority:  normal                             |      Component:  Compiler       
 
 Version:  7.7                                |       Keywords:  EmptyCase      
 
      Os:  Unknown/Multiple                   |   Architecture:  
Unknown/Multiple
 Failure:  Incorrect warning at compile-time  |      Blockedby:                 
 
Blocking:                                     |        Related:                 
 
----------------------------------------------+-----------------------------
 The following code

 {{{
 {-# LANGUAGE EmptyCase #-}
 {-# OPTIONS_GHC -fwarn-incomplete-patterns #-}
 data Void

 foo :: Void -> ()
 foo x = case x of {}
 }}}

 causes this warning

 {{{
 /Users/rae/temp/Scratch.hs:6:9: Warning:
     Pattern match(es) are non-exhaustive
     In a case alternative: Patterns not matched:
 Ok, modules loaded: Main.
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7669>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
ghc-tickets mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/ghc-tickets

Reply via email to