#5813: Offer a compiler warning for failable pattern matches
---------------------------------+------------------------------------------
    Reporter:  snoyberg          |       Owner:                  
        Type:  feature request   |      Status:  new             
    Priority:  normal            |   Milestone:  7.6.1           
   Component:  Compiler          |     Version:  7.2.2           
    Keywords:                    |          Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |     Failure:  None/Unknown    
  Difficulty:  Unknown           |    Testcase:                  
   Blockedby:                    |    Blocking:                  
     Related:                    |  
---------------------------------+------------------------------------------

Comment(by simonmar):

 For things like this we usually add a warning flag, but do ''not'' include
 it in `-Wall`.  We have a bunch of flags in this category already
 (cut/pasted from the docs):

 {{{
             <option>-fwarn-tabs</option>,
             <option>-fwarn-incomplete-uni-patterns</option>,
             <option>-fwarn-incomplete-record-updates</option>,
             <option>-fwarn-monomorphism-restriction</option>,
             <option>-fwarn-unrecognised-pragmas</option>,
             <option>-fwarn-auto-orphans</option>,
             <option>-fwarn-implicit-prelude</option>.</para>
 }}}

 In reply to maeder: the manual desugaring you describe is not semantics-
 preserving, so it's not surprising that you suddently get a new warning.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5813#comment:5>
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