Commit ef8deb5
feat(effects): thread parametric Throws[E] type argument (Refs #59)
STAGE-B cleanup. lower_effect_expr dropped EffCon type args, so
`Throws[MyErr]` collapsed to bare `Throws` — the type parameter the
#59 v1 list calls for (`Throws[E]`) was invisible.
Now the args are mangled into the effect singleton:
`Throws[MyErr]` -> ESingleton "Throws[MyErr]", distinct from
`Throws[Other]` and bare `Throws` under the string-equality
unification of `eff`. Chosen over growing the `eff` ADT with a
parametric variant (which would ripple across every effect operation
in effect.ml/unify.ml — disproportionate for this cleanup). The base
name is still validated via the v1 registry (`Bogus[E]` is still
rejected — verified).
Scope: this is effect *tracking* only. AffineScript does not currently
*enforce* effect-annotation subsumption at call sites (verified: even
`IO` body vs `Mut` decl passes today) — strict effect checking /
handler semantics remain the separately-deferred work (migration-stance
doc; #59 "tracking alone gives most of the value"). This PR makes the
tracked form carry `E`; it does not add enforcement.
dune build clean; dune test --force 253/253, zero regression.
Refs #59
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent ad50525 commit ef8deb5
1 file changed
Lines changed: 16 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
452 | 452 | | |
453 | 453 | | |
454 | 454 | | |
455 | | - | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
456 | 471 | | |
457 | 472 | | |
458 | 473 | | |
| |||
0 commit comments