Jadpo is experimental and not ready for production. These docs follow the compiler's main branch as of 30 Oct 2026. What's built · Install 0.1.0
jadpo
Reference: External services

External services

Enum values and failures through a package

How your app writes a package's enum values and failures: through the package's name, as its types are.

  • One path for every name through a package. An enum's value is written through its package as its type is, AcmeCouriers.Window.morning, and through the package and its version while two are held, Postcodes.v3.Round.morning; the version is missing or needless exactly as for a type (package.version_needed, package.version_unneeded), and the type must be one the package makes public. The same holds wherever a value is written: in a body, a constant, a test's fakes:, a variant built with its fields (Postcodes.v3.Round.shared { ... }) and a match arm's pattern, whose names resolution checks as a value's; a pattern resolution refuses leaves its arm's case unknown, so the match isn't also reported as not covering it. The enum written alone, Postcodes.Round, is type.not_a_value naming the enum, not the package.

  • A package's failure in an outcome match. An app's match on a provider call, a package action or a library package's function names the package's failure in its arm as fails and attempt write it, through the package, AcmeCouriers.SlotTaken ->, and through the package and its version while two are held, Postcodes.v3.InvalidPostcode ->; an arm it misses is named the same way. The version is missing or needless exactly as for a type, and an arm resolution refuses leaves its failure unknown, so the match isn't also told it misses one. Inside its own code a package still names its failures bare.

Markdown for agents: /docs/enum-values-and-failures-through-a-package.md.Built from Jadpo main at a707efb.