Write tests that compose multiple effect handlers (e.g., handle[State<Int>] inside handle[Exn<String>]) and verify the interactions are correct. Algebraic effect systems typically have subtle bugs in handler composition — particularly around the ordering of handlers and the semantics of resume when multiple handlers are active.
Test cases should include:
- State handler inside exception handler
- Exception handler inside state handler (verifying different semantics)
- Inference handler mocked inside an IO handler
- Verify that the effect row in the type signature correctly reflects composed handlers
Write tests that compose multiple effect handlers (e.g.,
handle[State<Int>]insidehandle[Exn<String>]) and verify the interactions are correct. Algebraic effect systems typically have subtle bugs in handler composition — particularly around the ordering of handlers and the semantics ofresumewhen multiple handlers are active.Test cases should include: