#3927: Incomplete/overlapped pattern warnings + GADTs = inadequate
---------------------------------+------------------------------------------
    Reporter:  simonpj           |        Owner:  simonpj     
        Type:  bug               |       Status:  new         
    Priority:  high              |    Milestone:  7.0.1       
   Component:  Compiler          |      Version:  6.12.1      
    Keywords:                    |     Testcase:              
   Blockedby:                    |   Difficulty:              
          Os:  Unknown/Multiple  |     Blocking:              
Architecture:  Unknown/Multiple  |      Failure:  None/Unknown
---------------------------------+------------------------------------------

Comment(by simonpj):

 Ok so you are saying that GHC is giving correct messages, but you'd like
 to see the warning become an error.

 I don't think we'll do this:
  * Technically dead GADT case alternatives are not ill-typed.  (Just look
 at any GADT paper.)
  * More pragmatically, GHC can spot ''some'' dead code, but not ''all''
 dead code. Eg
 {{{
  f x y | x > y  = ...
        | x <= y = ....
        | otherwise = ...dead code...
 }}}
  Even thinking only of type equalities, the solver cannot guarantee to
 find all unsatisfiable contexts.  So it'd be tricky to pin down exactly
 which programs were errors (and hence would not even compile) and which
 were only warnings (and hence would run).

 All in all, I think it's best as it is.  That said, the original bug
 report of this ticket still stands.

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