[Haskell-cafe] extra semi-colons

Johannes Waldmann johannes.waldmann at htwk-leipzig.de
Wed Jun 26 19:07:50 UTC 2019


> 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.


More information about the Haskell-Cafe mailing list