[GHC] #7669: Empty case causes warning

GHC cvs-ghc at haskell.org
Wed Feb 6 20:23:49 CET 2013


#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



More information about the ghc-tickets mailing list