Why this fires¶
handle <expr> with <handler_value> uses a value (a let h = handler { ... } binding, or an inline handler { ... } literal) instead of inline arms. When that handler value only covers some of an effect's operations — some arms present, but not all — TE807 fires at the with site, naming the missing operation(s).
effect Graphics {
fn setup()
fn draw()
}
pub let gfx = handler {
Graphics::setup() => { 1 },
}
fn render() with Graphics {
perform Graphics::setup()
perform Graphics::draw()
}
fn boot() {
handle render() with gfx
// error[TE807]: handler does not cover all operations of effect 'Graphics';
// missing: draw
}Fix it¶
Add an arm for the missing operation to the handler value:
pub let gfx = handler {
Graphics::setup() => { 1 },
Graphics::draw() => { 2 }, // ok — now fully covered
}See also¶
TE803— the same coverage check for inlinehandle ... with { ... }arms.TE814—handle ... with hwherehisn't a handler at all.- /docs/algebraic-effects — handler values (
let h = handler { ... }).