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

ErrorsLogic · rule

type.match_non_exhaustive

On this page

A match on an enum, a Bool or a value that may be none leaves out one of its cases.

Area 3, Logic; not declinable; the next step is usually the agent's.

Why Jadpo refuses it

A match picks what to do for each case of a value, and on an enum, a Bool or a nullable value every case can be listed. Listing them all means a variant added to an enum later stops every match that has to handle it from compiling, until it does. A match that left a case out would have nothing to do when that case came, so Jadpo refuses it, and _ isn't allowed to stand for the rest.

What it looks like

DeliveryState, an enum of pending, sent and failed, and the Label text type are declared in another file of the project, shapes.jadpo.

main.jadpo:

example
function describe(state: DeliveryState) -> Label {    return match state {        DeliveryState.pending -> "Pending"        DeliveryState.sent -> "Sent"    }}
jadpo checkcheck failed: 1 error, 2 files

error This match doesn't cover DeliveryState.failed

--> main.jadpo:2:12

  |2 |     return match state {  |            ^^^^^^^^^^^ 1 case not matched
reason
A match on an enum lists every variant, so a variant added later is caught at every match that has to consider it; _ isn't allowed on DeliveryState.
next
Add an arm for DeliveryState.failed (agent)
rule
type.match_non_exhaustive
help
https://jadpo.dev/docs/errors/type.match_non_exhaustive

(agent) at the end of the next: line means your coding agent can make the fix itself.

A match on a value that may be none lists some(name) and none. Here the none arm is missing:

main.jadpo:

example
type Label = Text {}function headline(title: Label, subtitle: Label?) -> Label {    return match subtitle {        some(shown) -> shown    }}
jadpo checkcheck failed: 1 error, 1 file

error This match doesn't cover none

--> main.jadpo:4:12

  |4 |     return match subtitle {  |            ^^^^^^^^^^^^^^ 1 case not matched
reason
A match on a nullable value lists some(name) and none.
next
Add an arm for none (agent)
rule
type.match_non_exhaustive
help
https://jadpo.dev/docs/errors/type.match_non_exhaustive

How to fix it

If a variant is missing, add an arm for each case the error names:

example
    return match state {        DeliveryState.pending -> "Pending"        DeliveryState.sent -> "Sent"        DeliveryState.failed -> "Failed"    }

A failed delivery is now described as "Failed". If a variant is added to DeliveryState later, this match stops compiling until it has an arm for it too.

If the none arm is missing, add it, with what to use when there is no value:

example
    return match subtitle {        some(shown) -> shown        none -> title    }

With no subtitle, the headline is the title.

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