[Haskell-cafe] Empty case alternative

Frantisek Farka frantisek at farka.eu
Fri Jun 27 16:18:59 UTC 2014

Hello cafe,

I was looking into Haskell Report 2010 and notice something in the
definition of case statement:


Apparently an empty alternative within case statement is a plausible
production. ('alt' production rule, third option).

If I get it correctly, following example shows the empty alternative:

> cStmt e = case e of { 'a' -> True ; {-- empty here --} ; 'b' -> False }

What I miss is any ratio behind this. What is the empty alternative
good for? Any idea?


More information about the Haskell-Cafe mailing list