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: Values and types

Values and types

One form for every type

Every type is declared the same way, type Name = Base { ... }. The base says what the type is built from, and the block holds the details: rules for a number or text, fields for an object, variants for an enum. An entity is declared on its own, because it is more than a type: it is stored, and it has actions, queries and policy (Data).

example
type ItemPrice = Decimal {  // rules on a number    scale: 2    min: 0.00}type StockCode = Text {  // rules on text    pattern: "[A-Z]{3}-[0-9]{4}"}type OrderId = Uuid {}  // a new identity type with no extra rulestype OrderLine = Object {  // fields    sku: StockCode    price: ItemPrice}type OrderStatus = Enum {  // variants    pending    paid    shipped}type PaymentOutcome = Enum {  // variants that carry fields    pending    paid: {        receipt_id: ReceiptId    }    declined: {        reason: DeclineReason    }}type CreateOrder = Input {  // an object arriving from outside    lines: List<OrderLineRequest>    note: OrderNote {        optional: true    }}type OrderView = Output {  // an object sent back    id: Order.id    total: ItemPrice}
  • Object, Enum, Input and Output are only ever used as a base here. There is no anonymous object written inline; every shape has a name.
  • Input objects may have optional and default fields and are the only objects a route accepts. Output objects are the only objects a route returns.
  • There are no value, enum, input or output keywords, and the types/ folder holds only type declarations.

Markdown for agents: /docs/one-form-for-every-type.md.Built from Jadpo main at a707efb.