Tracking issue for STDLIB-04a — first of five row-splits of the umbrella STDLIB-04 ledger item (docs/TECH-DEBT.adoc:162, Refs #175).
Scope
The Mut effect's externs in stdlib/effects.affine:
extern fn make_ref<T>(x: T) -> Ref<T> / Mut;
extern fn get<T>(r: Ref<T>) -> T / Mut;
extern fn set<T>(r: Ref<T>, x: T) -> Unit / Mut;
Current state (audit)
Per the 2026-05-24 audit, all three are stubs: surface syntax exists in js_codegen.ml (~line 144) for ref/deref/set operators, but no real wasm refcell type or host-import lowering is wired. Hermetic round-trip (make_ref → set → get) is unproven on all backends.
Acceptance
Severity / class
S3 (polish, per STDLIB-04 sev). Affects: lib/codegen_*.ml, lib/interp.ml, stdlib AOT gate.
Refs #175.
Tracking issue for STDLIB-04a — first of five row-splits of the umbrella STDLIB-04 ledger item (
docs/TECH-DEBT.adoc:162, Refs #175).Scope
The
Muteffect's externs instdlib/effects.affine:Current state (audit)
Per the 2026-05-24 audit, all three are stubs: surface syntax exists in
js_codegen.ml(~line 144) forref/deref/setoperators, but no real wasm refcell type or host-import lowering is wired. Hermetic round-trip (make_ref → set → get) is unproven on all backends.Acceptance
make_ref(x)allocates a real cell (wasm GC struct or host-side box per backend)get(r)reads,set(r, x)writes, withMuteffect tracked end-to-endtest/Severity / class
S3 (polish, per STDLIB-04 sev). Affects:
lib/codegen_*.ml,lib/interp.ml, stdlib AOT gate.Refs #175.