Skip to content

Exn<E> and custom effect handler compilation #53

Description

@aallan

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"

Metadata

Metadata

Assignees

No one assigned

    Labels

    codegenCode generation backendenhancementNew feature or requestlimitationKnown compilation limitation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions