Forma
Forma is a pre-alpha typed, homoiconic Lisp for building domain-specific languages and portable artifacts. Install the TypeScript engine with
pnpm add @formalang/ts, or try the browser playground at https://forma-lang.com/playground.
APIs, package boundaries, syntax, and artifact formats are still evolving. The TypeScript host includes a source-built forma JSON CLI and daemon, with filesystem module commands described in File modules. The TypeScript engine is the only implementation; it also powers the browser tools, language server, and workbench. The earlier OCaml engine was removed. Conformance fixtures and reviewed stored goldens pin implemented behavior. The TypeScript engine distinguishes Int and Float, including integral Float literals and results; Int arithmetic checks the JavaScript safe integer range. The structural workbench currently depends on unpublished Foldworks packages.
Getting started
- Quick start: Setup, examples, package layout, and current project status.
- TypeScript engine: Embedding the reader, evaluator, typechecker, VM, and elaborator.
- Language guide: Syntax, values, types, macros, effects, and elaboration.
- File modules: Explicit imports, exports, compile-time form libraries, and project preludes.
For agents
- Writing a form: Define domain vocabulary with preludes, descriptors, and elaboration hooks.
- Architecture: Engine boundary, host ABI and JSON CLI, artifacts, and conformance goldens.
- Forma for Effect: Generate Effect TypeScript from checked Forma declarations and programs.
- Forma for Elm-style apps: Foldkit prototype with exhaustive update, checked command recovery, and pure views; shared HttpApi client generation remains proposed.
- Elm prototype reference: Isolated prelude generator, supported forms, mounting, and current limits.
- Effect reference: Supported schemas, services, errors, resources, and operations.
- Language services: Analysis, node identity, observations, and structural edit scripts.
Optional
- Workbench: Structural editing, reviewable proposals, capability approvals, setup, and first-release limits.
- Conformance: Fixtures and stored goldens that pin implemented engine behavior.
- Retiring the OCaml engine: Why TypeScript is the only engine, the 2026-10-06 engine benchmarks, and remaining performance follow-ups.
- Roadmap: Current foundation and planned work; planned features are not compatibility promises.
- Record row rollout: Implemented closed-record operations and links to proposed generic constraints, normalization, typed reflection, and bounded row mapping.