How to read this reference
The reference lists the surface the compiler accepts. Short programs in the
tutorial are included from book/examples/ and checked by book/check.sh.
A fragment in the reference shows a form and leaves the surrounding program
out; the specification's complete programs live in
docs/design/ and
are compiled by the test suite.
A signature is written the way a declaration writes it. A call supplies the value group by flowing into the function, as Flow describes.
The pages are:
| Page | What it answers |
|---|---|
| Lexical structure | Tokens, literals, keywords |
| Declarations | func, proc, data, enum, menu, form, spec, hook, hand, def, sect |
| Expressions | Blocks, of, mu, do, let, chains |
| Types | Primitives, arrows, connectives, rows, signs |
| Patterns | What an arm or a let may match |
| Flow | <, |, >, application, cuts |
| Polarity | When a computation runs |
| Effects and handlers | hook, do, hn, hand, rows |
| Traits | spec, impl, bounds, associated types |
| Sections and files | sect, cite, files |
| Prelude | Names in every program |
| Standard library | Sections cited by path |
| Builtins | Operations the compiler provides |
| The slc command | run, check, fmt |
| Diagnostics | Phases and runtime failures |
| Surface forms | The shapes, gathered in one place |