You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
STDLIB-04b: Throws extern error<T> → real implementation #329
Tracking issue for STDLIB-04b — row-split of STDLIB-04 (docs/TECH-DEBT.adoc:162, Refs #175).
Scope
extern fn error<T>(msg: String) -> T / Throws;
declared in stdlib/effects.affine:29.
Current state (audit)
Per the 2026-05-24 audit, error<T> is missing in all backends — no wiring found in lib/interp.ml, lib/js_codegen.ml, or lib/codegen_deno.ml. Sibling panic is fully wired; error should mirror it but return the polymorphic T (i.e. panic-equivalent semantics, divergent — T is uninhabited at runtime because the call doesn't return).
Acceptance
error<T>(msg) lowered on all backends (matches panic runtime behaviour: throw/abort)
Throws effect tracked at the call site (parity with panic)
Hermetic e2e test: error<Int>("…") in a try/handler-equivalent boundary
CAPABILITY-MATRIX + TECH-DEBT updated in the same PR
Activity
docs(tech-debt): split STDLIB-04 into 04a–04e per per-extern audit (R…
feat(stdlib): STDLIB-04b — wire Throws extern `error<T>` (Closes …
fix(interp): wire missing string_length builtin (Refs #332, #329) (#362)