API Reference Cure Standard Library v#0.37.2
View SourceModules
The structured actor and dependent-reply behavior macro surface.
Shared compile-time substrate for actor-like abstractions.
OTP application declarations.
Arithmetic interfaces, split by operation rather than one monolithic
Num (spec §2.3): motivated by Std.Measurements (Duration has
add/sub/scale but no Duration * Duration — measurements.cure:84-90).
The primitive interned symbol.
Opaque native term at the foreign boundary. It can be passed to trusted primitives, but ordinary Cure code cannot inspect it or claim a type for it.
The bridge between Cure's two string representations.
Booleans as a real inductive type.
Bounded natural indices.
Conflict-free Replicated Data Types for Cure (v0.27.0).
Kernel-checked join-semilattice proofs for Cure's CRDT merge semantics.
The Unicode code point — Cure's character type.
Total ordering: the Comparable(t) interface, its Int and Float
instances, and what derives from < alone: <=, >, >=, compare,
min, max and clamp.
Identity, composition, booleans, comparison, and the Result /
Option sum types.
A proof that rem is a suffix of orig, indexed by whether at least one
element was consumed. This is the foundation of total lexers and parsers:
recursive drivers may descend only after receiving a Consumed(..., True, ...) witness.
Arbitrary-precision decimal arithmetic.
Decidable propositions -- a definitive yes-or-no answer that carries its own evidence.
A typed, honest stand-in for a dynamically-shaped value — the well-typed
replacement for Any.
Equality: the Equatable(t) interface behind ==, its instances for
Int, Float, Bool, Atom, Nat, Option(t) and List(t), and the
derived !=.
Propositional equality — the inductive identity type Equivalent(a, x, y)
(spec 2026-07-04-identity-type-as-inductive).
Typed reasons understood by Cure's safe process APIs. Because is the
deliberate raw-atom escape hatch for application- and OTP-specific
reasons; callers do not need to abandon the typed API to use one.
The primitive machine floating-point number.
The structured finite-state-machine (fsm) macro surface and typed
gen_statem transition helpers.
Functor interface for structures that support fmap.
Tiny stateless generator API for property-based testing (v0.19.0).
Canonical inductive integer, native at runtime.
Standard I/O operations for printing to stdout.
Lazy iterators.
Exact, typed JSON for Cure.
Eager, persistent, singly-linked lists.
User-defined contextual integer literals.
Map operations: get, put, delete, keys, values, merge.
Convenience helpers built on top of v0.18.0 deep destructuring.
Mathematical operations.
Literal units of measure (design 2026-07-08-units-macro-design).
Monad interface — structures that support sequencing with a failure arm.
Peano natural numbers for type-level computation.
A list that is guaranteed to hold at least one element.
Prelude fixity declarations for Cure's built-in operators. This module is loaded automatically; it does not expose a runtime API.
Statically-typed optics: lenses, affine traversals, and traversals.
Standalone Option(T) helpers.
Public names for the sealed raw carriers used by this module's signatures.
These aliases make the Std.Otp interface self-contained without leaking
every bare name imported from Std.Otp.Raw into downstream modules.
SEALED unsafe raw base for the typed BEAM process algebra.
Compatibility façade for process-signal operations.
Genuine propositional-equality proofs over the inductive Std.Nat
(spec 2026-07-04-identity-type-as-inductive).
Boolean-connective algebra over IsTrue (constructive, zero trust).
Discreteness of the inductive integers: strict comparison against right
is the same Boolean proposition as non-strict comparison against right-1.
Proof-carrying facts about Int, via decidable-Boolean reflection.
Proof-carrying order on the inductive integers Int = FromNat(Nat) | NegativeSuccessor(Nat), via decidable-Boolean reflection.
Executable affine syntax and Boolean candidate checking for LIA. This module is total and deliberately rejects malformed dimensions instead of inheriting List.zip_with's truncating semantics.
Indexed evidence wrappers, not a checker-to-goal soundness theorem.
Trusted semantic lemmas used by the linear-arithmetic proof modules. The declarations relate coefficient lists and their evaluated sums.
Proof-carrying mathematics used by refinements and ordinary Cure programs.
Kernel-checked well-founded recursion via the accessibility predicate Acc.
A deliberately small proof-directed data pipeline.
Refinement-oriented proof helpers for numeric predicates. Prefer ordinary indexed data and explicit propositions for new APIs; this module remains for compatibility with existing refinement clients.
Public verified Regex API and compatibility façade.
Shared indexed Regex vocabulary and definitionally relevant shape operations.
Constructive language semantics for typed regular expressions. Denotations retain the exact input partition, contextual suffix, and recursive evidence needed to relate an accepted Thompson-machine path to the authored pattern.
Proof infrastructure for the typed regular-expression evidence machine. These views expose the structural laws used to assemble and invert compiled evidence routines while retaining their dependent input and output indices.
Executable Regex machine, evidence VM, typed compiler, and combinators.
Compile-time support for Cure's regex literal syntax. The macro parses a
pattern and lowers it to the runtime Std.Regex representation.
Parser helpers for character classes inside regex literals.
Compile-time emitter for regex syntax trees. It turns parsed patterns into
the matcher representation consumed by Std.Regex.
Parser helpers for regex literal modifiers such as i, m, and u.
Compile-time-only literal syntax tree. It is consumed by expand_literal
and never appears in generated matching code.
Compile-time parser for regex literal patterns. It validates the complete literal and returns a structured syntax-tree error when parsing stops early.
Standalone Result(T, E) helpers.
Semigroup interface — types that support an associative combine.
Sets represented as maps with true values.
The Show protocol: convert values to their human-readable
String form.
The dependent pair (Σ-type) — Sigma(a, b) packages a value x : a together
with a value of type b(x), where the second component's type may depend on
the first. This is the library inductive that the compiler wires the surface
sugar to: %[x, y] builds one, .1/.2 project, and Sigma(x: T, U) is the
type syntax (spec 2026-07-09-sigma-retirement).
Value-surface string operations: length, concat, split, trim, case conversion, and integer/float/atom parsing.
The structured supervisor surface is source-defined, providing closed-vocabulary
restart, shutdown, child-type, and strategy constructors alongside the sup
and child_spec macros.
The generic quoted-AST value a Tier-3 computed by elab receives and
returns (macro-facility design §3, generic layer). Reflects the parser's
{tag, meta, third} node: Node for a child list, Leaf for a scalar
third value, Raw for a node the parser produced that doesn't fit the
{tag, meta, third} shape at all (e.g. a bare impossible-body marker
or a non-conforming pattern tuple) -- reflected opaquely rather than
crashing. attrs carries the semantic meta (a function's name, an
operator, a literal's subtype) — dropping it would lose those. A meta
value need not be a plain scalar: SynLit also covers a list of values
(SList), a nested AST (SSyntax), and a lookup table (SMap), each
losslessly. Source positions are not represented (the expansion is
re-elaborated, K3 firewall).
Explicitly unsafe syntax construction.
System operations: time, process identity, node info, exit.
Goal inspection for computed proof tactics.
The telescope type — the shape all surface tuples are made of.
Test assertion primitives plus a shrinking-aware property runner.
Time primitives for Cure (v0.27.0).
Fixed-size heterogeneous tuples (%[a, b, ...]): the Tuple type and
positional accessors such as first, second, third and swap.
The unit type — exactly one value, carrying no information.
Length-indexed vectors.