Error codes · Effects

PW0400

undeclared_effect

The program must hold to this: an effect row must name every effect the body performs.

A program the compiler refuses with it

Refused: PW0400
module stamp

import clock

fn stamp() -> Int {
    clock.now()
}

fn label() -> Int !{} {
    stamp()
}

From A function that says it is pure and is not, in Why Pleris. A test holds the guide's examples to the compiler.

Reading the diagnostic

pw check prints the code in brackets, [PW0400], with the sentence above and the place in your program. Errors and diagnostics explains how to read one, and every code is listed with its rule.