Work in progress. Programs compile from Coalton to C today, but only for numbers and the data built from them. STATUS.md lists what runs.
Static Heapless Expressions As Forms. Sheaf is a statically typed Lisp with no heap and no garbage collector. It uses Coalton as its frontend and a memory model after Goose: values live on stacks the compiler assigns, and memory is freed when its scope ends.
| Document | Covers |
|---|---|
| MEMORY.md | Data stacks, roots, and where values are built |
| CLOSURES.md | First-class functions without a heap |
| PIPELINE.md | The compiler's stages, and IR capture |
| IR.md | The first-order IR the analyses read |
| ROOTS.md | Checking that references outlive their stores |
| NUMBERS.md | Numeric types and what overflow does |
| PRELUDE.md | Arrays, slices and references |
| STRINGS.md | Char and String |
| STACKS.md | Assigning data stacks to cells and growable values |
| EMITTER.md | Emitting C and the data stack runtime |
| EXCEPTIONS.md | throw, catch and protect |
| C-AST.md | The C s-expressions the emitter builds and prints |
| MONOMORPHIZATION.md | Specializing at ground types and removing dictionaries |
| COALTON.md | The Coalton fork and how it is updated |
| STATUS.md | What runs today |
| TESTING.md | Running the tests |
Needs SBCL, Quicklisp and a C compiler.
git clone --recursive git@github.com:takeiteasy/sheaf.git
cd sheaf
make testTESTING.md covers the tests and CI.
sheaf
Copyright (C) 2026 George Watson
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.