Skip to content

Builtin Types

This page lists Shape’s core surface types and their intended use.

These are module-owned surface names, not user-defined globals. Import the ones you use explicitly. For the full target model, see Names and Scope.

from std::core::intrinsics use {
Vec,
Mat,
Table,
DateTime,
Result,
Option,
AnyError,
HashMap
}
print("imported")
// Prelude convenience does not change module ownership.
print("ok")

The types on this page are not prelude names.

TypeDescription
intSigned 64-bit integer (default)
numberFloating-point numeric value (f64)
boolBoolean (true / false)
stringUTF-8 text
noneExplicit absence value
TypeDescription
i8 / u88-bit signed / unsigned
i16 / u1616-bit signed / unsigned
i32 / u3232-bit signed / unsigned
u6464-bit unsigned

Width types support literal suffixes (42i8, 255u8) and out-of-range literals are rejected at compile time. Overflow-arithmetic semantics are not yet uniform across execution modes — see Integer Width Types for the full runtime-support details. Use int for general-purpose integer work.

TypeDescription
Vec<T>Ordered homogeneous sequence
Mat<T>Dense matrix (numeric workloads)
Table<T>Typed row-oriented data
Option<T>Optional value (Some(v) / None)
Result<T, E>Fallible value (Ok(v) / Err(e))
HashMap<K, V>Ordered key-value map
  • [] literals infer as Vec<T>.
  • Table<T> and Vec<T> are separate abstractions:
    • Vec<T> is positional sequence data.
    • Table<T> is named-column row data.
  • Mat<T> is the canonical matrix surface type name. Matrix<T> is not accepted.
  • print is prelude-provided; the types on this page are not.