LDC-E0207 — An underscore outside its one lawful slot
What it means
Section titled “What it means”The underscore means “there is some value here, and its identity does not matter”. The language grants it exactly one slot: a positive rule-body literal argument. Everywhere else — the head of a rule, under negation, in a status test, inside a term, in a case assertion, in a question — the underscore is not a term, and the expression is refused at its position.
The fix depends on what the underscore stood for. If the value truly does
not matter but the position needs a term, bind a fresh variable with for
and use it. If any value is acceptable because the literal only checks
presence, keep the body literal — the lawful slot — and move the reasoning
there.
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 strict { for a: A; when q(a); then p(_);}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 strict { for a: A; when q(a); then p(a);}Documentation for Arxo. Writings — blog.arxo.io.
Anonymous visit counts on stats.arxo.io, no cookies.