The SSPUR Handbook
The handbook teaches the language from the start. Read it in order: each page uses only what the pages before it covered.
- The Basics: programs,
main, bindings,if, tests, and how to run them. - Everyday Types: numbers, strings, lists, options, tuples, refinements and newtypes.
- Functions and Lambdas: signatures, examples, method-call syntax, lambdas and block lambdas.
- Records and Sum Types: your own data, immutable updates and generic types.
- Pattern Matching:
match, guards, or-patterns and list patterns,e is ptests andwhile e is ploops, guard clauses, exhaustiveness and decision tables. - Effects and Errors: effect rows,
raiseandcatch, your own effects and handlers. - Contracts and Tests:
pre,post,where, tests, examples,fuzz,verify, filling holes and suggested contracts. - Generics and Traits: type parameters, traits, bounds, operators and
derive. - Collections and Pipelines: list methods, maps and sets, loops and ranges.
- Concurrency:
par, atomics and channels, and the race checks. - Networking: HTTP servers and clients, TLS, configuration and structured logs.
- Databases: SQLite with typed rows, parameters, transactions, migrations and servers.
- Security and Crypto: password hashing, tokens, MACs, encryption, signatures and secrets.
- Files, Compression and CSV:
Bytes, gzip and zstd, and CSV with typed records. - Packages:
sspur.toml,pub,useand the lock file. - Publishing a package: the registry, versions, scoped names, the checks and
sspur publish.
Every code block in the handbook is a file in docs/snippets/handbook/, and every terminal session is run by the test suite against the current compiler. If a page and the compiler disagree, CI fails.
The handbook leaves out the parts most programs don’t need: the sys and bare profiles, GPU kernels, services and C interop. The tutorials cover those, and the full language reference has everything on one page.