#29: Check for exhaustive patterns is broken
---------------------------+------------------------------------------------
  Reporter:  nobody        |          Owner:                  
      Type:  bug           |         Status:  new             
  Priority:  lowest        |      Milestone:  _|_             
 Component:  Compiler      |        Version:  5.02            
Resolution:  None          |       Keywords:                  
Difficulty:  Unknown       |             Os:  Unknown/Multiple
  Testcase:                |   Architecture:  Unknown/Multiple
   Failure:  None/Unknown  |  
---------------------------+------------------------------------------------
Changes (by ganesh):

  * failure:  => None/Unknown

Comment:

 This is an unsolvable issue. Consider this simplified example:
 {{{
 foo x | x == 0 = 0
       | x /= 0 = 0
 }}}
 For "correct" Eq implementations these patterns are indeed exhaustive. But
 (a) GHC has no evidence that all Eq implementations are "correct", and (b)
 in general it would be undecidable to check whether arbitrary guards are
 exhaustive or not.

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