Each value choosing a data record variant is declared once
Each value of a field choosing a data record variant is declared once, whether or not a variant answers to it. It is declared either in the field's own list of values, or, for a data record described in contracts, in a list defined in a rule of a domain, which refines that data record and names the field whose values its list declares.
Declared once, a value is checked against every variant naming it, and a variant naming a value nobody declared is refused rather than read as a value of its own; a value with no variant is declared too, since the field may hold it all the same.
A data record described in contracts is shared by domains, so a domain adds the values it brings, and the variants answering to them, in a rule of its own, without changing the data record, which the owner of contracts holds; a data record one domain provides is described in that domain (§s-7vm323mhry2enx3), which declares its values itself.
The list names its field because a data record may choose its variant by several fields, and it refines the data record by its sid, so that it stays bound to the data record through a rename, and the check that each value is declared once follows that link.
The links it makes
The links made to it
The decisions taken on it
- Problem
The values choosing a data record's variant were read off its variants alone, so a value without one had to be given a variant holding nothing, and values declared in a sentence no tool can read were checked against no variant.
- Ruling
The owner: each value is declared once, in a place a tool reads, whether or not a variant answers to it.
- Problem
The rule named, beside a field's own list of values, the tables one project's tools read such values from.
- Ruling
The owner: the SpecSheriff guidelines keep the field's own list, and a project's own guidelines may declare such values elsewhere (§s-bsya3febm6u64ab).
- Problem
The rule allowed a place a project's own guidelines name for a variant's values, and nothing described how they name it, so the tools read the field's own list alone.
- Ruling
The owner: the other place stays and is described. For a data record described in contracts, a rule of a domain defines a list of the field's values and refines the data record by its sid; the tools collect the values from every such list and refuse one declared twice, the variant stands where its value is declared, and the generated types list every value. A data record one domain provides keeps its values in its own field, as the rule on contracts requires.