# Prelude (built-in) classes ## Prelude (built-in) classes The prelude ships the `Ordering` ADT, the `Eq` and `Ord` [classes](typeclasses.md), primitive `Eq Int/Bool/Str` and `Ord Int/Bool/Str` instances, and the five polymorphic free-fn helpers `ne`/`lt`/`le`/`gt`/`ge`. Float has neither `Eq` nor `Ord` instance per [Float semantics](float-semantics.md); a polymorphic helper invoked at Float fires `NoInstance` at typecheck with a Float-aware diagnostic cross-referencing this section. The lookup machinery that turns a `show x` call site into the right monomorphic instance is documented in [method dispatch](method-dispatch.md). The prelude ships `class Show a where show : (a borrow) -> Str` and primitive `Show Int`, `Show Bool`, `Show Str`, `Show Float` instances. Float **is** included in Show (unlike Eq/Ord) — IEEE-754 makes structural equality and total ordering semantically dubious, but textual representation of a Float is well-defined modulo the NaN-spelling caveat in [Float semantics](float-semantics.md). Each `Show ` instance body is a single-application lambda invoking the corresponding runtime primitive (`int_to_str`, `bool_to_str`, `str_clone`, `float_to_str`; see [Str ABI](str-abi.md) for the heap-Str primitives); no codegen intercept is required. The polymorphic helper `print : forall a. Show a => a -> () !IO` has body `\x -> let s = show x in do io/print_str s` (explicit let-binder for heap-Str RC discipline per the Str carve-out in [Str ABI](str-abi.md)). The let-binder is structurally pinned by `crates/ail/tests/print_mono_body_shape.rs`. Routing through `print` is the path for non-`Str` primitives; `io/print_str` is the only built-in direct-output effect-op. Ratified by: `crates/ail/tests/show_no_instance_e2e.rs`.