LDC-E0204 — A let without a written type
For LLMs5 sections
What it means
Section titled “What it means”A let inside a rule body names an intermediate value, and the language
asks for its type up front: let followed by the name, a colon, the type,
and the value. Without the annotation the reader cannot tell which
computation the name stands for, so the binding is refused where the value
starts.
The fix is the annotation, not a different value: write the binding as its own body line with the colon and the type the value already has. Everything downstream of the binding stays untouched.
Example
Section titled “Example”language "law.core" version "0.2";package demo.diagnostics version "0.1.0";namespace "urn:law:demo:diagnostics";
entity A;relation p(a: A) kind institutional;relation q(a: A) kind institutional;rule R defeasible { for x: A; when p(x) and (let v = 1 in v) = 1; then q(x);}language "law.core" version "0.2";package demo.diagnostics version "0.1.0";namespace "urn:law:demo:diagnostics";
entity A;relation p(a: A) kind institutional;relation q(n: Integer) kind institutional;relation r(n: Integer) kind institutional;rule R strict { for a: A; for n: Integer; when p(a) and q(n); let m: Integer = n + 1; then r(m);}Documentation for Arxo. Writings — blog.arxo.io.
Anonymous visit counts on stats.arxo.io, no cookies.