Built-in type forms
| Form | Meaning |
|---|---|
T? | Option<T> |
[T] | List<T> |
[T; n..m] | refined list with cardinality |
Set<T>, Map<K, V>, Range<T> | stdlib generics |
Result<T, E> | error-carrying result |
fn(T1, T2) -> U | function-type expression |
Path<NodeT, EdgeT> | first-class alternating node-edge sequence (The Path type) |
TypeRef, TypeRef<C>, Entity | reflective sorts (Reflection) — values are type-references |
First-class function values include references to declared fns and closures (Expression grammar); both share the fn(T1, T2) -> U type. Higher-kinded types and runtime trait objects (dyn Trait) are out of scope (Out of scope).
Reflective sorts. Entity, TypeRef, and Metatype are the reflective sorts of the meta-calculus (Reflection), ordered Metatype <: TypeRef <: Entity (and Entity <: Top). These are distinct from Top (Subtyping): Top is the <:-greatest type, whereas TypeRef is the sort whose values are references to declared types. The bounded form TypeRef<C> is sugar for the Refinement refinement { t: TypeRef where specializes(t, C) } (RFD 0017, where = primitive/asserted), with TypeRef == TypeRef<Top>. It is covariant — TypeRef<A> <: TypeRef<B> iff A <: B — which follows directly from the refinement ({t | t <: A} ⊆ {t | t <: B}), adding no new structural subtyping rule. Membership is three-valued under OWA (World assumptions (CWA / OWA), RFD 0007): specializes(t, C) unknown ⇒ not a member. Powertype / order / categorization semantics stay in the unprivileged mlt package (Higher-order modeling); TypeRef<C> carries none of them. See RFD 0023.