Skip to content
ZOLO / TE805 Effects · error

handler arm parameter-count mismatch

A function signature or handler references an effect the compiler cannot find.

Why this fires

A handle ... with { ... } arm's parameter list has a different number of parameters than the operation it handles declares.

effect Db {
    fn insert(table: str, row: str) -> int
}

fn run() with Db {
    let _ = perform Db::insert("t", "r")
}

fn driver() {
    handle run() with {
        Db::insert(a, b, c) => 0,
        //         ^^^^^^^ error[TE805]: handler arm 'Db::insert' expects 2
        //                  parameters, got 3
    }
}

Fix it

Match the arm's parameter count to the operation's declared arity:

fn driver() {
    handle run() with {
        Db::insert(a, b) => 0,   // ok — 2 parameters for a 2-parameter op
    }
}

See also

Global index

Find your way through Zolo

Try an idea

Start here

9 results

9 results

enespt-br