Markdown for LLMs
LDC-E0207 — An underscore outside its one lawful slot
The source Markdown for this article. Copy it into your assistant or download it as a text file.
# LDC-E0207 — An underscore outside its one lawful slot
## 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
```law
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(_);
}
```
## Fix
```law
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);
}
```
## Engine message
The engine reports this in its own wording:
```text
example.law:11:12: error LDC-E0207: `_` is allowed only as a positive rule-body literal argument (§98, E-0165): «есть какое-либо значение». In a head, under `not`, in a status test, inside a term, in a case assertion and in a question an underscore is not a term (§14)
```
## Related
- [LDC-E0204](/diagnostics/LDC-E0204/) — a let without a written type.