Skip to content
TE807 · Effects · error

Handler value coverage is incomplete

`handle … with <handler_value>` uses a handler value that covers only some of an effect's operations. The error fires at the `with` site and names the missing operation(s).

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 inline handle ... with { ... } arms.
  • TE814handle ... with h where h isn't a handler at all.
  • /docs/algebraic-effects — handler values (let h = handler { ... }).

See also

Search Zolo

9 results

en