Skip to content
docs
Arxo ↗

LDC-E1326 — Map over a non-enum domain

For LLMs5 sections

A map proves totality over declared membership: both ends must be enumerations of the package, so every member is known and every row lands somewhere. A domain or codomain that is not a package enum — an entity, a type alias, anything else — gives the map no membership to be total over, and the compiler stops at the offending end.

The repair is to declare the enumeration, or to point the map at one that exists. Rows that name non-members, or the same member twice, are refused by the same check once the ends resolve.

Arxo Law
language "law.core" version "0.2";
package demo.diagnostics version "0.1.0";
namespace "urn:law:demo:diagnostics";
enum Harmony {
Zhuan;
Zhinishke;
}
entity Tenant;
map broken_map: Tenant -> Harmony {
Zhuan => Zhuan;
}
Arxo Law
language "law.core" version "0.2";
package demo.diagnostics version "0.1.0";
namespace "urn:law:demo:diagnostics";
enum Harmony {
Zhuan;
Zhinishke;
}
map full_map: Harmony -> Harmony {
Zhuan => Zhuan;
Zhinishke => Zhinishke;
}

The engine reports this in its own wording:

Output
example.law:10:17: error LDC-E1326: map "broken_map": domain "Tenant" is not an enum of this package; totality is proven over the declared membership, and the §23 import context does not carry a foreign package's membership (§46.1)

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

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