Summary
Only State<T> effect handlers compile to WASM. Exn<E> and custom effect handlers are not yet supported in codegen.
Current state
handle[State<T>] compiles via host imports (vera.state_get, vera.state_put)
- Functions containing
handle[Exn<E>] or custom handlers are skipped with a warning
- The type checker and verifier handle all effect types correctly
- Only codegen is limited to State
What's needed
Exn<E> handler compilation (non-resuming handlers / exception semantics)
- Custom effect handler compilation (general one-shot continuations)
- Multi-shot continuations for effects like
Choice (advanced)
- WASM exception handling proposal integration (for Exn)
Spec reference
Chapter 11, Sections 11.11.4 and 11.12 "Limitations"
Summary
Only
State<T>effect handlers compile to WASM.Exn<E>and custom effect handlers are not yet supported in codegen.Current state
handle[State<T>]compiles via host imports (vera.state_get,vera.state_put)handle[Exn<E>]or custom handlers are skipped with a warningWhat's needed
Exn<E>handler compilation (non-resuming handlers / exception semantics)Choice(advanced)Spec reference
Chapter 11, Sections 11.11.4 and 11.12 "Limitations"