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

ErrorsProject layout and modules · rule

layout.unused_declaration

Shared declaration is not used.

Area 1, Project layout and modules; not declinable; the next step is usually the agent's.

example
type DueWindow = Int {    min: 1}
jadpo checkcheck failed: 1 error, 2 files

error DueWindow isn't used

--> domains/planning/types/due_window.jadpo:1:6

  |1 | type DueWindow = Int {  |      ^^^^^^^^^ nothing uses this
reason
A shared type exists to be used by several files; one that nothing uses is dead code. Tests don't count as users.
next
Use DueWindow, or remove it if nothing will (agent)
rule
layout.unused_declaration
help
https://jadpo.dev/docs/errors/layout.unused_declaration

Beside a file's primary declaration, a supporting type or helper is there for it: the primary uses it, directly or through another supporting declaration it uses. One only the file's tests use is dead code too:

example
type Shelf = Int {    min: -2    max: 2}type OvenTemperature = Int {    min: 0    max: 300}function top_shelf() -> Shelf {    return 2}/// The temperature for a bake on `shelf`: a high shelf runs hot.action set_oven(shelf: Shelf) -> OvenTemperature {    if (shelf > 0) {        return 190    }    return 200}
jadpo checkcheck failed: 1 error, 3 files

error top_shelf isn't used by set_oven

--> domains/kitchen/actions/set_oven.jadpo:11:10

   |11 | function top_shelf() -> Shelf {   |          ^^^^^^^^^ `set_oven` doesn't use this
reason
Everything in a file besides the declaration it is named after is there for that declaration, used by it directly or through one another; anything else is dead code. Tests don't count as users.
next
Use top_shelf in set_oven, or remove it if nothing will (agent)
rule
layout.unused_declaration
help
https://jadpo.dev/docs/errors/layout.unused_declaration

The file's test calls top_shelf, which doesn't count:

example
test "the top shelf is turned down" {    assert set_oven(top_shelf()) == 190}

A type written ahead of what will use it is refused the same way. Write it and its first user as one change, then check:

example
type DueWindow = Int {    min: 1}
example
use planning/types { DueWindow }/// The window a reminder waits, as it was asked for.action next_due(days: DueWindow) -> DueWindow {    return days}

Markdown for agents: /docs/errors/layout.unused_declaration.md.Built from Jadpo main at aee2e8f.