[Haskell-cafe] extra semi-colons

Brandon Allbery allbery.b at gmail.com
Wed Jun 26 19:09:45 UTC 2019


As of at least recently, empty cases are entirely permitted (and used for
e.g. Void / nullary types).

On Wed, Jun 26, 2019 at 3:08 PM Johannes Waldmann <
johannes.waldmann at htwk-leipzig.de> wrote:

> > The rule "alt" allows "(empty alternative)"
>
> Ah, yes. But no? The standard says
>
> > A case expression must have at least one alternative
> > and each alternative must have at least one body.
>
> Should this be "each non-empty alternative must have ..."?
>
> I think the intention is to allow
>
>     case () of () | False -> () | True -> ()
>
> (one alternative, two bodies) but to disallow
>
>     case () of ()
>
> (one alternative, no body)
>
> - J.
> _______________________________________________
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
> Only members subscribed via the mailman list are allowed to post.



-- 
brandon s allbery kf8nh
allbery.b at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20190626/cb55fcbb/attachment.html>


More information about the Haskell-Cafe mailing list