heff is a functional language with a Haskell-like syntax and a phase distinction: types are computed at compile time, data at run time.
- Types at compile time. Types, functions of types and records of them (theories) are values the type checker computes with -- a function takes its types as arguments,
{a : Type} -> ...-- while run-time data (numbers, strings, data types) never reaches a type. - Algebraic effects as a library: a computation names the effects it needs as instance arguments, and is given them where it runs.
- Behaviour-Oriented Concurrency: the main concurrency programming style, directly be supported by the runtime.
- Self-hosting: the compiler is written in heff, and builds from a seed of itself compiled to C.
- Two backends: C (native programs, built by zig; the runtime is part C, part Zig) and JavaScript (web pages, ES modules).
- Tools in the one executable: a formatter, a language server, doc tests and property tests, and packages fetched by git.
module hello
import co
import std.io
-- | `f` applied to each element
-- | >>> map not [True, False]
-- | [False, True]
map : {a b : Type} -> (a -> b) -> List a -> List b
map f [] = []
map f (y :: ys) = f y :: map f ys
main : Co stdio Unit
main = do
let ls : List String = ["heff", "world"]
for x in ls do
print $ "Hello, " ^ x ^ "!"heff run hello.hf prints the two greetings; heff test hello.hf checks the doc test of map.
With zig and make (Node.js only for some of the tests):
make install # build .heff/out/heff, then install it into ~/.heff/bin/Put ~/.heff/bin on your PATH.
heff init hello # a new project: a module, a program, a test
cd hello
heff build # check src/, build each program to .heff/bin/
heff test # the doc tests, watches and tests of src/ and test/
heff run app/hello/main.hf # run a program (C, by zig), without a build
heff install # build to run fastest, into ~/.heff/bin/
heff fmt src/hello/*.hf # format in place
heff dev # build and run; again at each changeheff help lists every command, and heff help COMMAND its flags.
- VS Code:
editors/vscode, a client ofheff lsp-- diagnostics, hover, go to definition, completion, formatting, renaming. A release has it built (heff-X.Y.Z.vsix). - Zed:
editors/zed, highlighting (a tree-sitter grammar,editors/tree-sitter-heff), an outline, and a client ofheff lsp. - bat (and Sublime Text):
editors/bat, a syntax for.hffiles.
The tutorial and the reference: https://0xfe-project.github.io/heff/.
make build # .heff/out/heff (from the seed, the first time)
make check # all a change is held to: from the seed, every test, the layout
make # every targetHow the source is laid out, the seed and the test groups are in DEVELOPING.md.
- Lynch & Staton, Hippogriff, arXiv:2608.19728: the core theory heff uses, and its implementation, which heff refers to.
- Yang & Wu, POPL 2026, arXiv:2511.05739: the idea behind heff's effects library,
co. - Behaviour-Oriented Concurrency, doi.org/10.1145/3622852: the main concurrency programming style supported in runtime.