Documentation
Release v0.4.0
Learn the language, look up a construct, or hand your agent its reference. Every page matches the release named on it.
Start
Get startedInstall Una, write a contract, watch it fail and fix it, then build a native executable.Editor setupDiagnostics and formatting in your editor, through the language server.
Guides
Learn
Una by ExampleThe book: small complete programs, one idea per page.ExamplesComplete packages to check, test and run, from the smallest.
Language guide
At a glanceEdition 0.2 on one page, with a link to each construct.Lexical structureNames, literals, comments and indentation.Modules and importsSplit a package into modules and import between them.Kinds and typesRecords, variants, refined types and units of measure.Functions and contractsWrite a function and say what it requires and ensures.Expressions and control flowConditions, pattern matching, loops and blocks.ErrorsFailures are values: declare them, raise them, handle them.Capabilities and effectsSay what a function may touch outside the program.Information flowLabel sensitive data and keep it where it belongs.RequirementsTie a contract to the requirement it comes from.Examples as testsExamples in the source that run as tests.VerificationWhat una check proves, and what it reports when it cannot.Canonical formOne way to write each program: what una fmt does.A complete packageA whole package read from top to bottom.Not in this editionWhat edition 0.2 leaves out, and where a later edition adds it.
Reference
Standard libraryThe types and functions every program has.Command lineEvery una command and its options.Configure a packageThe files of a package and every key they take.DiagnosticsEach diagnostic code: what it means and how to fix it.SpecificationThe normative text, chapter by chapter.
Agent interface
Una for agentsThe full guide for an agent that writes, checks and repairs Una.Una, compactThe language in one page, sized for an agent's context.The loopThe cycle an agent repeats: format, check, fix, test.JSON outputThe JSON each command returns, and how to read a diagnostic.RepairsThe fixes a diagnostic proposes, in the order to try them.Build reportWhat a build proved, trusted and assumed, as one document.SchemasThe schemas of the JSON documents the tools print.