#2431: allow empty case analysis
---------------------------------+------------------------------------------
 Reporter:  RalfHinze            |          Owner:         
     Type:  feature request      |         Status:  new    
 Priority:  normal               |      Milestone:         
Component:  Compiler             |        Version:  6.8.3  
 Severity:  minor                |     Resolution:         
 Keywords:  empty case analysis  |     Difficulty:  Unknown
 Testcase:                       |   Architecture:  Unknown
       Os:  Unknown              |  
---------------------------------+------------------------------------------
Changes (by Isaac Dupree):

 * cc: [EMAIL PROTECTED] (added)

Comment:

 Of course, with the correct warning flags enabled, empty case of a non-
 empty type will produce an "incomplete pattern match" warning: exactly
 when we want a warning for using this construct.

 I suppose the effect is to throw a pattern-match error that is independent
 of the case'd value, as consistent with all patterns of any other case
 statement failing?  (rather than using it if it's _|_, as of course it
 will be if it's an empty type: because, unlike in GHC Core, source-Haskell
 'case' does not introduce strictness)

 +1, I've occasionally wanted this to be possible

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