Overview
Partly builtWhat Clay is, what's actually built today, and how to read the rest of this manual.
Clay is an experimental fork of Unison’s semantics —
content-addressed code, where the hash of a definition’s syntax tree is its
identity, and names are separate, mutable metadata pointing at immutable hashes —
wrapped in a different surface syntax: a ReScript/ReasonML-flavoured let,
functions and if, instead of Unison’s own Haskell-flavoured one.
This manual documents the language as it exists today, not the full design. Each page carries a status badge:
- Implemented — real, working, checked against Unison’s own reference implementation (UCM) as the oracle: if Clay’s kernel and UCM disagree on a program’s hash or type, that disagreement is a loud failure, and nothing is written.
- Partly built — a real, working subset exists, with named gaps.
- Designed, not built — written up in the language’s design notes, with concrete syntax sketched in places, but nothing a parser accepts yet.
Clay is a prototype. A working pipeline exists end to end — a hand-written grammar, a Rust kernel (hashing and typechecking, compiled to WebAssembly so it runs in a browser), a small compiler and code store, and a browser-based editor — but the language itself is still small. The What’s not built yet page is the single most honest page in this manual if you only read one.
Reading a code sample
Every highlighted code sample in this manual is real Clay source, run through the actual grammar at build time — not an approximation. If you see a code block that isn’t syntax-highlighted, that’s deliberate: it’s a sketch of proposed syntax that doesn’t parse yet, shown as plain text rather than dressed up to look more finished than it is.