#595: Overhaul GHC's overlapping/non-exhaustive pattern checking
------------------------------------------------+---------------------------
  Reporter:  simonmar                           |          Owner:               
       
      Type:  task                               |         Status:  new          
       
  Priority:  normal                             |      Milestone:  _|_          
       
 Component:  Compiler                           |        Version:  None         
       
Resolution:  None                               |       Keywords:  warnings     
       
        Os:  Unknown/Multiple                   |   Architecture:  
Unknown/Multiple    
   Failure:  Incorrect warning at compile-time  |     Difficulty:  Difficult 
(2-5 days)
  Testcase:  N/A                                |      Blockedby:               
       
  Blocking:                                     |        Related:               
       
------------------------------------------------+---------------------------

Comment(by simonpj):

 No, no one is working on it, as far as I know, and I would love someone to
 pay attention to it.  There are a bunch of related tickets: at least #595,
 #5728, #3927, #5724, #5762, #4139.  It has the great merit of being a
 nicely-separable task, one that doesn't interact with the rest of GHC.

 There is a good literature to guide you:

  * Several papers by Luc Maranget, including a JFP paper
 [http://moscova.inria.fr/~maranget/papers/warn/index.html Warnings for
 patttern matching]
  * Neel Krishnaswami [http://www.cs.cmu.edu/~neelk/pattern-popl09.pdf
 Focusing on pattern matching]

 However these papers focus entirely on a "block" of pattern matching, for
 example, a function defined by pattern matching.  Many of the tickets go
 further:

  * Consider
 {{{
 f xs@(y:ys) = .....case xs of { (y:ys) -> ... }
 }}}
  The inner pattern match should not complain about a missing nil case.
 You may think this is a silly program, but it's less silly when record
 updates are concerned.

  * Matches that involve GADTs.  Here things are a bit more complicated,
 and involve figuring out what branches are inaccessible because of type
 constraints.  It's not that hard, but generating good warnings goes beyond
 what the literature covers.

 I don't want to supervise this, but would would be happy to offer advice
 and guidance about GHC aspects, if someone else would lead.

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