Markdown for LLMs
LDC-E2118 — A parameter on a type that takes none
The source Markdown for this article. Copy it into your assistant or download it as a text file.
# LDC-E2118 — A parameter on a type that takes none
## What it means
Only a closed list of standard types takes parameters: option, result,
list, set, map, interval, and money name their slots, and every other
standard name stands alone. Writing a parameter on a name outside that
list is rejected at the type — the parameter would otherwise travel
into the lowered form unchecked by anything.
Dropping the parameter, or switching to the parametric type actually
meant, fixes it. Parameters on the lawful seven keep working exactly
as before.
## Example
```law
language "law.core" version "0.2";
package demo.diagnostics version "0.1.0";
namespace "urn:law:demo:diagnostics";
entity Mass;
relation weighed(m: Mass) kind empirical;
relation logged(q: Integer<Mass>) kind institutional;
rule R strict { for m: Mass; when weighed(m); then logged(3); }
```
## Fix
```law
language "law.core" version "0.2";
package demo.diagnostics version "0.1.0";
namespace "urn:law:demo:diagnostics";
entity Mass;
relation weighed(m: Mass) kind empirical;
relation logged(q: Integer) kind institutional;
rule R strict { for m: Mass; when weighed(m); then logged(3); }
```
## Engine message
The engine reports this in its own wording:
```text
example.law:7:20: error LDC-E2118: type `Integer` takes no parameter (§35, errata E-0194): the §35 table declares parametric only `Option<T>`, `Result<T, E>`, `List<T>`, `Set<T>`, `Map<K, V>`, `Interval<T>` and `Money<C>`; on other std names a parameter was lowered into CLIR and checked by nothing
```
## Related
- [Vocabulary](/constructs/vocabulary/) — which types take parameters.
- [Expressions and quantities](/constructs/expressions-quantities/) — how parametric types are written.