Prelude
The Prelude is loaded automatically for ordinary compilation and execution. It defines the core capability vocabulary and a small compatibility surface; no import is required.
Ordering
Ordering
The result of a three-way comparison.
LT
The left value precedes the right value.
EQ
The values have equal ordering.
GT
The left value follows the right value.
Equality and ordering capabilities
Eq
Requires an equality operation for a. Built-in implementations cover scalar
and numeric types.
equals
Ord
Requires a three-way ordering operation for a. Numeric and character values
use their ordinary order. Text compares lexicographically by Unicode scalar.
compare
Numeric capabilities
Num
Supplies evidence for arithmetic and conversions over Jazz's primitive numeric
types. Implementing Num for another type does not extend the set of types
accepted by numeric expressions.
Integral
Marks integral numeric types. Built-in signed and unsigned integer types implement it.
Fractional
Marks fractional numeric types. Built-in floating types implement it.
Rendering and defaults
Showable
Requires stable runtime-value rendering for a. Built-in scalar and numeric
types implement it.
show
Renders a value using its active Showable(a) implementation and stable Jazz
value syntax.
Default
Provides a type-directed default. Built-in numeric defaults are zero, Bool
uses False, Char uses '\0', and Text uses "".
defaultValue
defaultValue :: a.
Compatibility list helpers
map
Applies a function to every item and preserves order. Prefer
listMap in library-oriented code.
filter
Keeps the items whose predicate is True, preserving order. Prefer
listFilter in library-oriented code.
hd
tl
hd and tl are partial: an empty list fails fatally with E3009 or E3010,
respectively. Prefer listHead and
listTail when emptiness is possible.
Effectful compatibility value
print!
print! :: a -> a.
In stub-v1, evaluates and returns its argument without emitting output. Its !
suffix still classifies it as impure. Run-mode rendering of the final expression
is separate from print!.
Numeric conversions
Conversion inputs must satisfy Num(a). Integer targets require an in-range
integral value. Floating targets use deterministic target-format rounding;
non-finite or overflowing conversions fail with a runtime diagnostic.
toInt8
Converts to an 8-bit signed integer and rejects values outside -128 through
127.
toInt16
toInt32
toInt64
toUInt8
Converts to an 8-bit unsigned integer and rejects values outside 0 through
255. Example: toUInt8 255 succeeds; toUInt8 256 fails.
toUInt16
toUInt32
toUInt64
toFloat16
toFloat32
toFloat64
toInt
An alias of toInt64 with the same range and integral-input requirements.
toFloat
An alias of toFloat64 with the same rounding and overflow behavior.
Use --no-prelude only for compiler or runtime work. Its low-level support
surface is not a user API. See capabilities for
constraint syntax and resolution.