Language forms#
Every surface form of the language has a feature contract in
docs/language/features/. A filled contract answers the same ten questions for its form:
lexical and grammar rules; scope and binding; type and quantity requirements; effects,
totality and evaluation order; elaboration into core; representation and target support;
error codes and their origins; formatting and migration; positive, negative, execution and
edge-case tests; and compatibility with the previous edition, serialized forms and cache
keys. This index is generated from those files when the site is built.
The specification remains the normative definition of the language; a contract states how one form meets it. The language reference lists which compiler module owns each form's syntax, static semantics and erasure, and whether the form reaches a native artifact today.
Contracts (31)#
Forms added or changed since the contract system began, plus overview contracts that tie
several forms together. draft-alpha-2027 forms belong to the draft edition: preview a
module's rewrites with alpha migrate --from alpha-2026 --to alpha-2027 --check.
| Form | Feature | Edition | Status | Suite |
|---|---|---|---|---|
| Application feature contract (L16) | overview | — | — | — |
| byte conjunction | form:byte-and | alpha-2027 | draft-alpha-2027 | tests/language/ByteBitOperations.alpha |
| byte disjunction | form:byte-or | alpha-2027 | draft-alpha-2027 | tests/language/ByteBitOperations.alpha |
| byte left shift | form:byte-shift-left | alpha-2027 | draft-alpha-2027 | tests/language/ByteBitOperations.alpha |
| byte right shift | form:byte-shift-right | alpha-2027 | draft-alpha-2027 | tests/language/ByteBitOperations.alpha |
| byte exclusive disjunction | form:byte-xor | alpha-2027 | draft-alpha-2027 | tests/language/ByteBitOperations.alpha |
| exact byte literal | form:byte-string-literal | alpha-2027 | draft-alpha-2027 | tests/language/text/alpha-tests |
| readable match case | form:case | alpha-2027 | draft-alpha-2027 | tests/language/matching |
| checked effect sequencing | form:do | alpha-2027 | draft-alpha-2027 | tests/language/sequencing |
| f32-add | form:f32-add | alpha-2027 | draft-alpha-2027 | tests/alpha-tests |
| f32-divide | form:f32-divide | alpha-2027 | draft-alpha-2027 | tests/alpha-tests |
| f32-equal | form:f32-equal | alpha-2027 | draft-alpha-2027 | tests/alpha-tests |
| f32-less-than | form:f32-less-than | alpha-2027 | draft-alpha-2027 | tests/alpha-tests |
| f32-multiply | form:f32-multiply | alpha-2027 | draft-alpha-2027 | tests/alpha-tests |
| f32-sqrt | form:f32-sqrt | alpha-2027 | draft-alpha-2027 | tests/alpha-tests |
| f32-subtract | form:f32-subtract | alpha-2027 | draft-alpha-2027 | tests/alpha-tests |
| requested induction hypothesis binder | form:ih | alpha-2027 | draft-alpha-2027 | tests/language/matching |
| sharing-preserving local sequences | form:let* | alpha-2027 | draft-alpha-2027 | tests/language/sequencing |
| readable exhaustive matching | form:match | alpha-2027 | draft-alpha-2027 | tests/language/matching |
| readable matching with an explicit motive | form:match-with | alpha-2027 | draft-alpha-2027 | tests/language/matching |
| compile-time natural addition | form:nat-add | alpha-2027 | draft-alpha-2027 | tests/language/NatArithmeticCompileTime.alpha |
| compile-time natural truncated division | form:nat-divide | alpha-2027 | draft-alpha-2027 | tests/language/NatArithmeticCompileTime.alpha |
| integer literals and explicit compact naturals | form:nat-literal | alpha-2027 | draft-alpha-2027 | tests/language/NatLiteralCompact.alpha |
| compile-time natural remainder | form:nat-modulo | alpha-2027 | draft-alpha-2027 | tests/language/NatArithmeticCompileTime.alpha |
| compile-time natural multiplication | form:nat-multiply | alpha-2027 | draft-alpha-2027 | tests/language/NatArithmeticCompileTime.alpha |
| compile-time natural saturating subtraction | form:nat-subtract | alpha-2027 | draft-alpha-2027 | tests/language/NatArithmeticCompileTime.alpha |
| named record projection | form:project | alpha-2027 | draft-alpha-2027 | tests/language/records |
| named record construction | form:record | alpha-2027 | draft-alpha-2027 | tests/language/records |
| Named records feature contract (L17) | overview | — | — | — |
| validated UTF-8 text literal | form:text-literal | alpha-2027 | draft-alpha-2027 | tests/language/text/alpha-tests |
| functional record update | form:update | alpha-2027 | draft-alpha-2027 | tests/language/records |
Inherited forms (50)#
These forms were accepted in alpha-2026 before contracts existed. Their behaviour is
covered by the edition conformance suite tests/alpha-tests; their syntax and owners are
in the grammar and the reference. A change to one of them replaces its stub with a filled
contract and a form-specific suite.
| Form | Edition | Read |
|---|---|---|
app | alpha-2026 | grammar · reference |
bind | alpha-2026 | grammar · reference |
byte | alpha-2026 | grammar · reference |
byte-equal | alpha-2026 | grammar · reference |
byte-less-than | alpha-2026 | grammar · reference |
byte-to-nat | alpha-2026 | grammar · reference |
bytes | alpha-2026 | grammar · reference |
bytes-append | alpha-2026 | grammar · reference |
bytes-builder-append | alpha-2026 | grammar · reference |
bytes-builder-build | alpha-2026 | grammar · reference |
bytes-builder-chunk | alpha-2026 | grammar · reference |
bytes-builder-empty | alpha-2026 | grammar · reference |
bytes-checksum | alpha-2026 | grammar · reference |
bytes-cons | alpha-2026 | grammar · reference |
bytes-eliminate | alpha-2026 | grammar · reference |
bytes-equal | alpha-2026 | grammar · reference |
bytes-head | alpha-2026 | grammar · reference |
bytes-index-nonzero | alpha-2026 | grammar · reference |
bytes-length | alpha-2026 | grammar · reference |
bytes-set-free-index | alpha-2026 | grammar · reference |
bytes-set-index | alpha-2026 | grammar · reference |
bytes-tail | alpha-2026 | grammar · reference |
computation | alpha-2026 | grammar · reference |
constructor | alpha-2026 | grammar · reference |
effect-row | alpha-2026 | grammar · reference |
effects | alpha-2026 | grammar · reference |
eliminate | alpha-2026 | grammar · reference |
equal | alpha-2026 | grammar · reference |
family | alpha-2026 | grammar · reference |
first | alpha-2026 | grammar · reference |
fsucc | alpha-2026 | grammar · reference |
fzero | alpha-2026 | grammar · reference |
lambda | alpha-2026 | grammar · reference |
let | alpha-2026 | grammar · reference |
nat-eliminate | alpha-2026 | grammar · reference |
nat-less-than | alpha-2026 | grammar · reference |
nat-to-byte | alpha-2026 | grammar · reference |
pair | alpha-2026 | grammar · reference |
partial | alpha-2026 | grammar · reference |
pi | alpha-2026 | grammar · reference |
read-file | alpha-2026 | grammar · reference |
refl | alpha-2026 | grammar · reference |
return | alpha-2026 | grammar · reference |
runtime-image-v4-build | alpha-2026 | grammar · reference |
second | alpha-2026 | grammar · reference |
sigma | alpha-2026 | grammar · reference |
succ | alpha-2026 | grammar · reference |
transport | alpha-2026 | grammar · reference |
write-file | alpha-2026 | grammar · reference |
zero | alpha-2026 | grammar · reference |