This page defines the schema-level vocabulary used by the reference.
A schema kind is a primary schema family. A schema group is a named set of schemas defined by a criterion. Exact field layouts, callable signatures, and other schema-specific details remain outside these broad categories.
| Kind | Common sources | Description |
|---|---|---|
Block |
[...] |
Compile-time block schema. Meta. |
Code |
codeRef, importFunction, exportFunction |
Callable code schema whose exact signature belongs to the schema. |
Cond |
DEBUG, FALSE, TRUE, predicate results |
Condition schema used by branching and logical condition operations. |
Dict |
{...} with named fields |
Struct schema with named items. |
Int8 |
Integer literals with i8 |
8-bit signed whole-number schema kind. |
Int16 |
Integer literals with i16 |
16-bit signed whole-number schema kind. |
Int32 |
Integer literals with default integer syntax or i32 |
32-bit signed whole-number schema kind. |
Int64 |
Integer literals with i64 |
64-bit signed whole-number schema kind. |
Intx |
Integer literals with ix |
Pointer-width signed whole-number schema kind. |
List |
array, uniform (...), uniform unnamed {...} |
Struct schema with unnamed items of one shared item schema. |
Nat8 |
Natural literals with n8 |
8-bit unsigned whole-number schema kind. |
Nat16 |
Natural literals with n16 |
16-bit unsigned whole-number schema kind. |
Nat32 |
Natural literals with n32 |
32-bit unsigned whole-number schema kind. |
Nat64 |
Natural literals with n64 |
64-bit unsigned whole-number schema kind. |
Natx |
Natural literals with nx |
Pointer-width unsigned whole-number schema kind. |
Real32 |
Real literals with r32 |
32-bit floating-point schema kind. |
Real64 |
Real literals with default real syntax or r64 |
64-bit floating-point schema kind. |
Ref |
@NAME, .@NAME, @, fieldRead |
Reference schema kind. The schema defines the target schema and mutability. |
Text |
"TEXT", «TEXT», & |
UTF-8 text schema kind. |
Tuple |
Non-uniform (...), empty (), non-uniform unnamed {...} |
Struct schema with unnamed items whose item schemas are not required to match. The empty value () is a Tuple. |
A schema group is a named set of schemas defined by a criterion. Some groups are unions of schema kinds, while others are defined by broader schema properties.
| Group | Criterion | Where it matters |
|---|---|---|
Int |
Schemas whose kind is Int8, Int16, Int32, Int64, or Intx. |
Signed Int operations and comparisons. |
Meta |
Schemas of zero size. | Compile-time-only objects and schema-level operations. Tested by virtual?. |
Nat |
Schemas whose kind is Nat8, Nat16, Nat32, Nat64, or Natx. |
Nat operations, counts, and address-like values. |
Number |
Schemas in the Whole or Real groups. |
Arithmetic, numeric comparisons, casts, and numeric transforms. |
Real |
Schemas whose kind is Real32 or Real64. |
Floating-point transforms such as cos, log, and sqrt. |
Ref-like |
Schemas whose kind is Ref, Code, or Text. |
isRef and fieldIsRef. |
Scalar |
Schemas in the Cond kind or the Number group. |
Scalar value operations and comparisons. |
In-place |
Schemas whose values are stored directly at their own runtime location. | Default runtime data path. Numbers, Cond, and non-Meta Struct schemas are In-place. Contained fields may still be Ref-like; the term describes the outer schema, not recursive field contents. |
Struct |
Schemas whose kind is Dict, List, or Tuple. |
Struct schema operations such as isCombined, fieldCount, fieldIndex, fieldName, and has. |
Whole |
Schemas in the Int or Nat groups. |
Bitwise operators and shifts such as and, lshift, rshift, xor, and ~. |
The groups above are schema-level sets. The recurring consequences below summarize common implications of those groups.
In-place locals and non-static In-place fields use the default runtime-object path. Mentioning them yields an immutable Ref-like result, reading them yields a Ref result, and writing to them replaces the stored value itself.Ref-like values use special value rules of their own kinds. Ref copies or replaces references, Text copies text values, and Code follows callable-code rules.Meta values are compile-time objects. Operations that require runtime object storage reject them or create fresh compile-time objects instead of reading or writing stored runtime objects.Struct is the union of Dict, List, and Tuple, so schema operations such as fieldCount, fieldName, and isCombined are stated through that group.Whole, Number, Scalar, Int, Nat, and Real are arithmetic grouping terms used to state builtin acceptance and result rules concisely.{} 0 {} [
"-- schema kinds --" printCompilerMessage
[] schemaName printStack _:;
{x: 0;} schemaName printStack _:;
(1 2) schemaName printStack _:;
0n32 schemaName printStack _:;
"hi" schemaName printStack _:;
"-- schema groups --" printCompilerMessage
{x: 0;} isCombined printStack _:;
(1 2) isCombined printStack _:;
[] code? printStack _:;
{} () {} codeRef codeRef? printStack _:;
() virtual? printStack _:;
0n32 managed? printStack _:;
0
] "main" exportFunction
-- schema kinds --
"«test.mpl» 3 3 Block"
"{x: Int32;}"
"Int32 2 array"
"Nat32"
"Text"
-- schema groups --
TRUE
TRUE
TRUE
TRUE
TRUE
FALSE
Dict, List, and Tuple item layouts are not schema kinds or schema groups.code?, codeRef?, isCombined, managed?, same, and virtual?.