Skip to content

Primitives Reference

Version 0.2

The __primitives__ module is synthesized by the compiler and implicitly available to every Ceramic program. It provides primitive types, fundamental operations, and compile-time introspection.

For the language itself, see the Language Reference.

Conventions

  • Each entry is introduced by its signature in a fenced ceramic block.
  • Pattern guards ([T when ...]) and the trailing semicolon mark forward declarations.
  • Functions documented here may not be overloaded unless otherwise noted.
  • SizeT refers to the compiler-internal unsigned integer whose size matches a pointer. It is not actually exported by __primitives__.

Sections

Section Contents
Primitive Types Bool, integers, floats, pointers, Array, Vec, Tuple, Union, Static, ByRef, …
Data Access bitcopy, arrayRef, tupleRef, recordFieldRef, recordVariadicField, enum conversions
Multiple Values countValues, nthValue, takeValues, dropValues, integers
Numeric Operations Arithmetic, comparison, bitwise, conversion, checked integer ops
Pointer Operations Pointer arithmetic, casts, function pointers
Atomic Operations Memory orders, loads/stores, RMW, compare-exchange, fences
Exceptions activeException
Introspection Symbols, types, records, variants, enums, static strings, modules, lambda types
Compiler Interface Flags, external function attributes, branch prediction