LDC-E2403 — A function whose purity is not proved
What it means
Section titled “What it means”A plain function may lower only when its complete local call graph proves it free of effects: no snapshot reads, no judgment relations, no opaque or unknown calls, no recursion without a termination certificate. An explicit purity claim raises the same bar and adds the author’s word to it. When any dependency lacks an effect descriptor — an imported name the unit cannot see into, for example — purity is unproved and the compiler refuses the function at its name.
The fix proves purity or drops the claim: compute from data alone with local pure calls, or declare the heavier effect through the channel the language provides for it. A body of plain arithmetic over its parameters lowers without a word.
Example
Section titled “Example”language "law.core" version "0.2";package demo.diagnostics version "0.1.0";namespace "urn:law:demo:diagnostics";
pure function Unproved(x: Integer) -> Integer = foreign.pkg::rate(x);language "law.core" version "0.2";package demo.diagnostics version "0.1.0";namespace "urn:law:demo:diagnostics";
function Increment(x: Integer) -> Integer = x + 1;Documentation for Arxo. Writings — blog.arxo.io.
Anonymous visit counts on stats.arxo.io, no cookies.