Standard Library Overview

The Paradox standard library is a single package called std. Import it with:

import std

This loads all definitions from every .dox file in the std directory. File names are purely organizational — they have no effect on imports or compilation.

Sections

Std

valid and illuminate interfaces, CRUD, Module, URI, URIAuth

Collection

for interface, reduce, filter, map, iterate, take, drop, any, all, elem, notelem, zip, zipWith, cons, snoc, head, tail

Algebra

Either, Maybe, Tuple, These with for instances and fold functions

Numeric

Natural, Positive, Negative, Port, WellKnownPort, RegisteredPort, EphemeralPort, PortType

Function

identity, const, flip, starling, apply, ylppa, applyBinary, curry, uncurry, compose

Persist

Key, Entity, entity interface, SQLDefault, IndexType, ForeignKeyAction

Machine

Guard, Transition, StateConfig, Machine — Finite state machine types with compile-time verification and code generation for eleven languages

Submodules

std/ast (import with import std/ast)

Self-hosted AST types — SrcSpan, Import, Product, Union, Expression, Type, Term, Primitive

Built-in Support

Some features work without any import:

  • Optionals (T?) — built into the language

  • Arrays ([T]) and Sets ({T}) — built into the language

  • for on arrays, sets, and optionals — built-in, no import needed

The for interface itself is defined in the std package, but the built-in instances for arrays, sets, and optionals are always available.

Import Patterns

Import the standard library:

import std

Import the standard library and its AST submodule:

import std
import std/ast

There is no import collection or import numeric — those are organizational files inside the std module directory, and import std loads them all.