[Haskell-cafe] extra semi-colons
Johannes Waldmann
johannes.waldmann at htwk-leipzig.de
Wed Jun 26 19:19:48 UTC 2019
On 6/26/19 9:09 PM, Brandon Allbery wrote:
> As of at least recently, empty cases are entirely permitted
Yes I know, but this is not about "empty case" (= no alternative?),
but about one (or more) empty alternatives
(that are accepted without -XEmptyCase ).
I admit it's not related to any practical problem.
It came up in the following way: a student
who compared ghc's behaviour to that of a purpose-built parser
for case expressions that I wrote for my e-Learning/testing system.
And I thought - well, the Standard certainly should
explain ghc's behaviour, but I have a hard time parsing it.
More nit-picking: while "case () of { }"
prompts the "Use EmptyCase" hint,
"case () of { ; }" is a parse error (no hint),
with or without -XEmptyCase.
- J
More information about the Haskell-Cafe
mailing list