Documentation
Fango’s documentation: how to install it, how the language works, and what the standard library provides.
Start with your first program, in the browser or on your machine. The language guides build from values and functions to types, effects, and resource lifetimes. They assume you have programmed before; they introduce functional programming as you go.
Use the standard-library guides when you have a task in mind. The API reference provides signatures and documentation drawn from comments in the language source.
Getting started.
- Installing FangoChoose Nix or a source build, then set up your editor.
- Your first programRun a small program, then separate its pure calculation from its output.
- Setup and commandsCheck, run, format, and build a program; understand where Fango finds its library.
- The REPLTry expressions and declarations in a persistent interactive session.
- DebuggingSet breakpoints, step through Fango source, and inspect bindings in the REPL or a compiled program.
Language.
- Syntax and operatorsRead values, expressions, blocks, and the operators used in everyday Fango.
- FunctionsDefine calculations, pass functions as values, and express repetition with recursion.
- Types and patternsModel data with lists, records, and alternatives, then inspect it with patterns.
- Modules and importsSplit a program into files and expose a deliberate public interface.
- Type classesWrite operations that work across types, and provide an implementation for each type.
- Effects and handlersDescribe what a function does, then choose how to interpret its requests.
- Resources and scopesAcquire resources around the work that uses them and release them on every language exit.
- MetaprogrammingBuild expressions at compile time and derive operations from a type’s structure.
- Native Go sidecarsImplement a small, typed Fango boundary with an adjacent Go sidecar.
Standard library.
- CollectionsChoose lists, optional values, results, tuples, and dictionaries for everyday data.
- Text and numbersWork with Unicode text and convert external text into numeric values.
- Regular expressionsSearch text with checked literal patterns or patterns compiled at runtime.
- Parsing token listsWrite direct-style parsers with effects, and combine them with choice, repetition, and backtracking.
- BytesKeep binary input unchanged and choose an explicit conversion when it becomes text.
- Readers and writersParse and emit byte streams with scoped buffering.
- Encodings and text I/ODecode transport bytes explicitly, then read and write Unicode characters.
- Files, console and socketsUse the console, files, process environment, and sockets as services you can swap for tests.
- URLsParse a URI reference, resolve it against a base, and encode components deliberately.
- HTTP server and middlewareBuild a response, route a request, and stream bodies inside connection scopes.
- HTTP clientSend requests through an explicit transport handler and choose buffered or streaming responses.
- Failure, state and randomnessUse standard handlers to turn requests into results, local state, or reproducible draws.
- Dates and timesHow Fango models calendar dates, moments, zones, and the current time, and which type to reach for.
- StreamsTraverse a sequence one step at a time with explicit state.
- JSONDecode directly into typed data or use a generic document when its shape is unknown.
- JSON pull parserWrite a custom decoder or consume a document without building its full tree.
- TestingWrite expectations, group tests, and choose handlers and reports for a test run.
Concurrency and runtime.
- Async tasks and channelsStart concurrent work, manage its lifetime, handle failures, and communicate through channels.
- Transactional memoryShare variables between tasks and update them together in atomic, composable transactions.
