Jadpo is experimental and not ready for production. These docs follow the compiler's main branch as of 5 Nov 2026. What's built · Install 0.3.0
jadpo
ReferenceErrors

ErrorsValues and types · rule

type.rule_outside_object

Rule is written outside an object type.

Area 2, Values and types; not declinable; the next step is usually the agent's.

Only an Object, Input or Output names rules across its fields: a refinement's rules are its constraints, and an entity's records are made by writes, which have their own conditions (area 6):

example
type Nights = Int {    min: 1    rule short_stay: Nights <= 14}
jadpo checkcheck failed: 1 error, 1 file

error Only an Object, Input or Output names rules across its fields

--> main.jadpo:3:5

  |3 |     rule short_stay: Nights <= 14  |     ^^^^^^^^^^^^^^^ in a type built on `Int`
reason
Nights, built on Int, can't hold a rule: a rule relates the fields of one object, so it is written in the block of an Object, Input or Output, and checked whenever a value of it is made.
next
Move the rule into the object type whose fields it reads, or remove it (agent)
rule
type.rule_outside_object
help
https://jadpo.dev/docs/errors/type.rule_outside_object

Markdown for agents: /docs/errors/type.rule_outside_object.md.Built from Jadpo main at aee2e8f.