Commit 24379f9
#135 slice 3 — two coupled grammar gaps, both pervasively used by the
stdlib effect layer and both mandated by settled ADRs:
1. Bare `effect <name>;` forward declaration (empty op list; the ops are
supplied separately as `extern fn ... / E;`). effects.affine uses
`effect io; effect state; effect exn;`.
2. The ADR-008 canonical `-> T / E` effect-row return annotation. This
was a *settled* decision (SETTLED-DECISIONS ADR-008) yet the `/`-form
was entirely absent from the grammar — even a normal `fn ... -> T /
io` could not be written; only the `-{ E }->` form parsed. Single
`effect_term` covers 100% of stdlib usage; multi-effect rows remain
expressible via `-{ E1 + E2 }->`.
Grammar-cost (full disclosure): any `ARROW type_expr SLASH _` production
in `return_type` adds exactly one arbitrarily-resolved reduce/reduce
item to an already-r/r state (35 -> 36; the 5 r/r *states* and all s/r
counts are unchanged). It is irreducible without a grammar-wide
restructure, sits in this grammar's existing permissive-ambiguity class,
and per the settled ADR-009 ("conformance suite is authoritative; parser
conforms to spec, validated by tests") is accepted with behaviour
verified: `-> T / io` parses; division `a / b`, `-{ E }->`, braced
`effect E {}`, plain `-> T` all unaffected; full suite green (226).
effects.affine advances 5 -> 21; next blocker is `extern fn ref<T>`
(`ref` = REF keyword), a keyword-as-identifier issue folded into slice
6's scope (triage doc updated).
Advances #135. Refs #128, #135.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 74d5da5 commit 24379f9
2 files changed
Lines changed: 40 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
194 | 212 | | |
195 | 213 | | |
196 | 214 | | |
| |||
489 | 507 | | |
490 | 508 | | |
491 | 509 | | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
492 | 520 | | |
493 | 521 | | |
494 | 522 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3331 | 3331 | | |
3332 | 3332 | | |
3333 | 3333 | | |
| 3334 | + | |
| 3335 | + | |
| 3336 | + | |
| 3337 | + | |
| 3338 | + | |
| 3339 | + | |
| 3340 | + | |
| 3341 | + | |
| 3342 | + | |
| 3343 | + | |
| 3344 | + | |
3334 | 3345 | | |
3335 | 3346 | | |
3336 | 3347 | | |
| |||
3383 | 3394 | | |
3384 | 3395 | | |
3385 | 3396 | | |
| 3397 | + | |
3386 | 3398 | | |
3387 | 3399 | | |
3388 | 3400 | | |
| |||
0 commit comments