Skip to content
docs
Arxo ↗

LDC-E1338 — Instance name already declared

For LLMs5 sections

An instance introduces its reference name into the package namespace: generated identifiers derive from it, and references resolve through it. A name that a declaration already owns cannot be taken again — the two owners would answer under one name. The compiler stops at the instance.

The repair is a rename: give the instance a name nothing else declares. Generated identifiers then derive without collision.

Arxo Law
language "law.core" version "0.2";
package demo.diagnostics version "0.1.0";
namespace "urn:law:demo:diagnostics";
entity Person;
entity Choice;
entity SpecialChoice : Choice;
entity Other;
const Selected: SpecialChoice = entity_ref("urn:choice:selected");
const Wrong: Other = entity_ref("urn:choice:wrong");
relation eligible(p: Person, choice: Choice) kind empirical;
relation applicable(p: Person, choice: Choice) kind institutional;
expansion fixed {
params { subject: binder; choice: value; ground: relation(subject, choice); result: relation(subject, choice); }
emit rule self/result defeasible {
for subject;
when ground(subject, choice);
then result(subject, choice);
scope from self; effective from self; labels from self; source from self;
}
}
expand fixed Selected {
label en official "Fixed option";
bind subject = person: Person;
choice = Selected;
ground = eligible;
result = applicable;
effective [@2026-01-01, @2027-01-01);
}
Arxo Law
language "law.core" version "0.2";
package demo.diagnostics version "0.1.0";
namespace "urn:law:demo:diagnostics";
entity Person;
entity Choice;
entity SpecialChoice : Choice;
entity Other;
const Selected: SpecialChoice = entity_ref("urn:choice:selected");
const Wrong: Other = entity_ref("urn:choice:wrong");
relation eligible(p: Person, choice: Choice) kind empirical;
relation applicable(p: Person, choice: Choice) kind institutional;
expansion fixed {
params { subject: binder; choice: value; ground: relation(subject, choice); result: relation(subject, choice); }
emit rule self/result defeasible {
for subject;
when ground(subject, choice);
then result(subject, choice);
scope from self; effective from self; labels from self; source from self;
}
}
expand fixed Result {
label en official "Fixed option";
bind subject = person: Person;
choice = Selected;
ground = eligible;
result = applicable;
effective [@2026-01-01, @2027-01-01);
}

The engine reports this in its own wording:

Output
example.law:22:14: error LDC-E1338: expand Selected: instance name is already declared in the package (§279.1.4)

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

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