Closed MatthewDaggitt closed 2 years ago
I can't reproduce this with 2.9.4 without more information, unfortunately. [Are you on 2.9.4?]
In 2.9.2 and 2.9.3 I can reproduce something like this with this grammar
layout "let";
layout stop "in";
layout toplevel;
Prg. P ::= [S] ;
separator S ";" ;
In. S ::= "forall" Integer "in" Integer ;
Let. S ::= "let" "{" [S] "}" "in" Integer ;
and this input:
forall 4 in 3
Error on 2.9.2:
TestIssue: LayoutIssue.hs:(166,35)-(167,55): Non-exhaustive patterns in case
Error on 2.9.3:
TestIssue: LayoutIssue.hs:(170,35)-(171,55): Non-exhaustive patterns in case
I suspect this is a 2.9.3 issue. Closing. Please reopen with some example grammar and input if this should persist in 2.9.4.
Yes, we were on 2.9.3. I can confirm that 2.9.4 fixes it. Apologies I should have checked the versions first.
If you have a
layout stop
keyword but no correspondinglayout
keyword, you get a crash with a pattern match failurethe same error as reported in #144.For example if we have
and we write
gives
The offending generated code is:
which appears to have no case for
Nothing
.Forgive me for not providing a full minimal example. Cutting down the grammar would be a lot of work. Hopefully this should be enough to diagnose the problem. If not then I can put in the time.