Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Standard Library

Prism’s standard library is ordinary Prism source, not compiler built-ins. A small always-on prelude supplies the core types, the type-class tower, and the common data modules in unqualified scope; everything else is opt-in via explicit import. The pages below are generated from the module sources, with signatures taken from the typechecker.

Merkle root

  • Scheme: prism-core-hash-v1
  • Hash: 474e80de33830113949ef2e76d09211e92422ea1b6d9906a4c19f8a335923d40
  • Compiler version: Prism v0.10.0

Modules

  • The Prelude - The always-on prelude: wired-in types, the type-class tower, core combinators, and the effect/loop machinery.
  • Data.List - Singly-linked list operations.
  • Data.Maybe - Operations over Option.
  • Data.Result - Operations over Result.
  • Data.Map - Persistent ordered map: an AVL-balanced binary search tree over keys.
  • Data.Set - Ordered sets, reusing the balanced-tree map.
  • Data.Ordered - Explicit ordering witnesses: the branded, statically coherent path to ordered maps.
  • Data.Char - ASCII character classification.
  • Data.String - String operations, byte-oriented and ASCII-accurate.
  • Data.Foldable - Generic operations over any Foldable container.
  • Data.Monad - Generic operations derived from the Applicative and Monad classes.
  • Data.Checked - Safe arithmetic families over the machine-integer lanes.
  • Data.Vec - Fixed-length vectors indexed by a Nat dimension.
  • Data.Tensor - Dense multi-dimensional tensors over a flat FloatBuf.
  • Data.FlatArray - Flat, unboxed-element arrays: one typed surface over the raw-word buffers.
  • Teleport - The checked mobility boundary. teleport runs a portable, single-use computation as a unit that is safe to move to a fresh runtime.
  • Replay - Record/replay handlers for the capability effects.
  • Concurrent - Cooperative async/await concurrency as a single handler, polymorphic in the effects the fibers perform.
  • Quickcheck - Property testing: run a boolean property over many generated inputs and report the first counterexample, deterministically.
  • Wire - The opt-in serialization layer.
  • Data.Bytes - Byte strings: the String/Bytes boundary, and the hex and base64 codecs.
  • Incr - Incremental computation as a handler over a content-addressed dependency graph.
  • Test - Per-type value generators for property testing.
  • Blit - Range copy over the sequence types a real primitive can back.
  • Time - Time: instants, wall-clock timestamps, durations, and RFC 3339.
  • Json - JSON: a dynamic value tree, a total parser, a canonical encoder, and a typed layer.
  • Sequence - The one lazy iteration protocol: pull-based sequences with natural names.
  • Cli - CLI: an applicative command-line parser as a first-class value.