Skip to content

Keywords

Every reserved keyword, with a one-line description. Reserved words cannot be used as identifiers.

There are 59 reserved keywords.

KeywordMeaning
BoolThe boolean base type.
DurationThe time-span base type, in milliseconds (5.minutes).
EffectThe effectful-computation type, Effect[T].
ErrThe error variant of Result.
FloatThe floating-point base type.
InstantThe absolute-time base type, in epoch milliseconds (Clock.now()).
IntThe integer base type.
JsonErrorThe JSON-decode error type, Result[T, JsonError] from Json.decode.
NoneThe empty variant of Option.
OkThe success variant of Result.
OptionThe optional-value type, Option[T].
ResultThe success-or-error type, Result[T, E].
SomeThe present variant of Option.
StringThe string base type.
ValidationErrorThe error type returned by a refined type’s .of.
actorDeclare an actor — a boundary contract a handler consumes via by.
adapterDeclare an adapter — the host boundary (capability contract + binding).
agentDeclare a stateful, keyed agent inside a context.
andCombine refinement predicates (where A and B).
asAlias a consumed context (consumes X as Y).
assertAssert a condition inside a test case.
bindingName an adapter’s TypeScript binding module (binding "<module>").
byName the actor a handler consumes (on … by <name>: <Actor>).
capabilityDeclare a capability (a dependency interface) in a context.
commonsDeclare a pure, stateless module of types and functions.
consumesDeclare a dependency on another context’s services.
contextDeclare a deployable context (services, agents, capabilities).
cronThe cron protocol on a service header (from cron).
elseThe alternative branch of an if expression.
enumDeclare a payloadless sum type (enum { A, B }).
expectReserved keyword.
exportsDeclare which types a context exposes, and how.
falseThe boolean literal false.
fnDeclare a function.
fromName the protocol a service conforms to (service X from http).
givenDeclare the capabilities a handler requires.
httpThe HTTP protocol on a service header (from http).
ifA conditional expression.
impliesLogical implication (P implies Q ≡ `!P
invariantDeclare an agent invariant — a predicate that must hold of every committed state.
isTest a value against a variant pattern, yielding a Bool.
letBind a local value (let x = …, or let x <- … for an effect).
matchPattern-match over a sum type, Result, or Option.
mocksProvide a mock capability implementation in a test.
onBegin a handler declaration (on call, on GET(…), on message, on open/on close).
opaqueDeclare an opaque type, or export a type opaquely.
protocolReserved keyword (protocols are a closed, compiler-known set).
providesProvide an implementation of a capability.
queueThe queue protocol on a service header (from queue("name")).
recordReserved keyword (records are written type X = { … }).
selfThe current agent instance, inside a handler.
serviceDeclare a service (a group of handlers) in a context.
testDeclare a test block or a test case.
transparentExport a type with its structure visible (exports transparent { … }).
trueThe boolean literal true.
typeDeclare a type: alias, record, sum, opaque, or refined.
usesBring a commons into scope.
whereAttach refinement predicates to a base type.
wiresList the contexts a test integration stands up as Workers.