#7397: -fwarn-irrefutable-patterns
-----------------------------+----------------------------------------------
Reporter:  chrisdone         |          Owner:                  
    Type:  feature request   |         Status:  new             
Priority:  normal            |      Component:  Compiler        
 Version:  7.6.1             |       Keywords:                  
      Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
 Failure:  None/Unknown      |      Blockedby:                  
Blocking:                    |        Related:                  
-----------------------------+----------------------------------------------

Comment(by guest):

 I think you're searching for -fwarn-incomplete-uni-patterns.

 You get a warning on:

 {{{
 data Query = GetTheStuff Int | B

 foo :: Query -> Int
 foo x = 0 where
   GetTheStuff n = x
 }}}

 However, experimenting with this I found a bug. If I replace "GetTheStuff
 n = x" with "GetTheStuff _ = x" the warning disappears.

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

_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to