
25 Jun
2019
25 Jun
'19
6:43 a.m.
Dear Cafe, why does ghc accept the extra semi-colon in case () of { () -> (); } or even case () of { ;;; () -> () ;;; } Yes I understand that semicolons like this are introduce by the layout rule L (<n> : ts) (m : ms) = ; : (L ts (m : ms)) if m = n https://www.haskell.org/onlinereport/haskell2010/haskellch10.html#x17-178000... and it's convenient to ignore extra ones. But it's not in the grammar? alts → alt1 ; … ; altn (n ≥ 1) https://www.haskell.org/onlinereport/haskell2010/haskellch3.html#x8-460003.1... - J.