Skip to content
docs
Arxo ↗

LDC-E2141 — A variants cell of the wrong type

For LLMs5 sections

A row of variants declares the type of each cell up front, and every cell must hold a value of that type: money in the stated currency for a money cell, a non-negative value for a natural cell, and so on. A cell that breaks the declared type would feed the scenario a value the norm never quantifies over. The compiler checks each cell against its declared type and refuses the row at the offending value.

The fix is inside the cell: write the value in the declared type and currency. Scenario rows always carry a separate notice that they are not part of the program itself; the type refusal clears as soon as the value matches, and the corrected value below is shown as a plain assertion.

Arxo Law
language "law.core" version "0.2";
package demo.diagnostics version "0.1.0";
namespace "urn:law:demo:diagnostics";
entity KZT;
test "row" variants (m: Money<KZT>) {
"r" (100);
} {
given {}
}
Arxo Law
language "law.core" version "0.2";
package demo.diagnostics version "0.1.0";
namespace "urn:law:demo:diagnostics";
entity KZT;
relation due(m: Money<KZT>) kind empirical;
assert due(100 KZT);

The engine reports this in its own wording:

Output
example.law:7:6: error LDC-E2141: variants: cell m does not match type Money

Documentation for Arxo. Writings — blog.arxo.io.

Anonymous visit counts on stats.arxo.io, no cookies.