#2431: allow empty case analysis
------------------------------------+---------------------------------------
    Reporter:  RalfHinze            |       Owner:          
        Type:  feature request      |      Status:  new     
    Priority:  normal               |   Component:  Compiler
     Version:  6.8.3                |    Severity:  minor   
    Keywords:  empty case analysis  |    Testcase:          
Architecture:  Unknown              |          Os:  Unknown 
------------------------------------+---------------------------------------
 Using -XEmptyDataDecls I can declare an (almost) empty data type.
   data Void
 However, I can't use an empty case to discriminate values of the
 empty type.

 This does not work:
   get :: Void -> a
 Only the type signature, but no body. [This would be useful also
 in other circumstances.]
   get :: Void -> a
   get v = case v of { }
 An empty case in the body.

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