Skip to content
ZOLO / TE803 Effects · error

`handle` block does not cover all operations of the effect

A `handle` block is missing the implementation for one of the effect's declared operations.

Why this fires

A handle expr with { ... } block's arms don't cover every operation of an effect that expr performs.

effect Logger {
    fn info(m: str)
    fn warn(m: str)
}

fn run() with Logger {
    perform Logger::info("hi")
    perform Logger::warn("careful")
}

fn driver() {
    handle run() with {
        Logger::info(m) => print(m),
        // error[TE803]: handle block does not cover all operations of effect
        //               'Logger'; missing: warn
    }
}

Fix it

Add an arm for every operation the effect declares:

fn driver() {
    handle run() with {
        Logger::info(m) => print(m),
        Logger::warn(m) => print(m),   // ok — now fully covered
    }
}

See also

  • TE807 — the same idea, but for a handle ... with <handler_value> whose handler value only partially covers an effect.
  • TE804 — a handler arm names an operation the effect doesn't have.
  • /docs/algebraic-effects — handle blocks and coverage.

Global index

Find your way through Zolo

Try an idea

Start here

9 results

9 results

enespt-br