Commit 22bdaaa
fix(parser): braced /{E1, E2} return-position effect row (Refs #59)
The effects-migration-stance guide uses /{IO} and /{IO, Async} verbatim,
but only the bare single-term `-> T / E` and prefix `-{ E1 + E2 }->`
forms parsed; migrators could not write the documented syntax.
Adds `ARROW type_expr SLASH LBRACE sep_nonempty_list(COMMA, effect_term)
RBRACE`, folded into EffUnion via effect_union_of_list. The SLASH LBRACE
prefix is unambiguous (bare form continues on IDENT; prefix row uses
MINUS LBRACE; `{` cannot open a division operand in type position).
Conflict STATES unchanged (25 s/r, 5 r/r — the documented ADR-008/009
permissive class); the 35->36 r/r item is exactly what the ADR-008
note predicts for any SLASH production. dune test 253/253, zero
regression. Verified: /{IO} and /{IO, Async} parse+typecheck, /{IO,
Bogus} still rejected via the PR-1 registry, bare /IO unregressed.
Refs #59
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent e1c1591 commit 22bdaaa
1 file changed
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
35 | 43 | | |
36 | 44 | | |
37 | 45 | | |
| |||
209 | 217 | | |
210 | 218 | | |
211 | 219 | | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
212 | 232 | | |
213 | 233 | | |
214 | 234 | | |
| |||
0 commit comments