LDC-E2108 — Operands of incompatible kinds
For LLMs5 sections
What it means
Section titled “What it means”Arithmetic and comparison work on matching kinds: adding a date to money, or ordering values that have no order, is rejected where it stands. The language performs no silent conversions between kinds — each operand must already be what the operation expects.
Rewriting the expression so both sides share a kind, or picking the operation that fits the kinds at hand, fixes it. The message names the two kinds found, which points straight at the side to change.
Example
Section titled “Example”language "law.core" version "0.2";package demo.diagnostics version "0.1.0";namespace "urn:law:demo:diagnostics";
relation out(x: Text, a: Money) kind institutional;relation m(x: Text, a: Money) kind empirical;relation d(x: Text, t: Date) kind empirical;rule R strict { for x: Text; for a: Money; for t: Date; when m(x, a) and d(x, t); then out(x, (t + a)); }language "law.core" version "0.2";package demo.diagnostics version "0.1.0";namespace "urn:law:demo:diagnostics";
relation out(x: Text, a: Money) kind institutional;relation m(x: Text, a: Money) kind empirical;relation d(x: Text, t: Date) kind empirical;rule R strict { for x: Text; for a: Money; for b: Money; when m(x, a) and m(x, b); then out(x, (a + b)); }Documentation for Arxo. Writings — blog.arxo.io.
Anonymous visit counts on stats.arxo.io, no cookies.