---
title: "1.10 Recap and reference"
url: https://una-lang.org/en/learn/hello/recap-and-reference/
release: v0.4.0
edition: "0.2"
---

# 1.10 Recap and reference

## 1.10.1 For agents

:::agents
`una --json check .` prints each diagnostic with its `code`, `message`, `primary` span and `repairs`; `una --json test .` prints each example's outcome. U0003, U1001 (when it can name the operation meant), U1008 and U2004 carry exact edits, which `una fix .` applies. U3003's repair adds a `uses` line, which gives the function more authority, so `una fix` never applies it: add it by hand. U0001, U0101, U2001 and U3004 depend on intent, so their repairs, when they have one, are descriptions only. The compact rule: *a package is `una.toml`, `verification.lock` and `src/<module>.una` with a matching `module` line; the entry module has `pub main() -> Unit`; a function that prints declares `uses @console: Console[print]`, and the run grants `console`.*
:::

## 1.10.2 Recap

:::recap
- A package is `una.toml`, `verification.lock` and modules under `src/`; `una check .` checks it, and `una run .` also runs it.
- The file `src/morning.una` holds the module `morning`, and its first line says `module morning`.
- A run starts at `pub main() -> Unit` of the module that `entry` names, and runs its steps in order.
- A function is a header, `=`, and a body: one line in the short form, several steps in the long form.
- Every argument after the first carries its label, or is a name equal to its parameter's: `section("Hours", notice: opening_hours())`.
- A public function that prints says so, `uses @console: Console[print]`, and so does every public function that calls it; the run grants `console` in `una.toml`.
- Comments start with `--`; doc comments, `---`, document the declaration under them.
- An example calls a function and states its result: `do greeting()`, then `expect result == "Good morning"`.
:::

## 1.10.3 Reference

:::reference
- Start: [install](https://una-lang.org/en/docs/get-started/#1-install), [get started](https://una-lang.org/en/docs/get-started/)
- Construct pages: [source files, comments and literals](https://una-lang.org/en/docs/language/lexical-structure/), [functions](https://una-lang.org/en/docs/language/functions/), [`uses`](https://una-lang.org/en/docs/language/capabilities/uses/), [host capabilities and grants](https://una-lang.org/en/docs/language/capabilities/host/), [`example`](https://una-lang.org/en/docs/language/examples/example/)
- Configuration: [`[package] edition`](https://una-lang.org/en/docs/configure/package/edition/), [`[run] entry`](https://una-lang.org/en/docs/configure/run/entry/), [`[run] grants`](https://una-lang.org/en/docs/configure/run/grants/), [`verification.lock`](https://una-lang.org/en/docs/configure/verification-lock/)
- Commands: [`una check`](https://una-lang.org/en/docs/cli/check/), [`una run`](https://una-lang.org/en/docs/cli/run/), [`una test`](https://una-lang.org/en/docs/cli/test/), [`una fmt`](https://una-lang.org/en/docs/cli/fmt/), [`una fix`](https://una-lang.org/en/docs/cli/fix/), [`una explain`](https://una-lang.org/en/docs/cli/explain/)
- Standard library: [the host capabilities](https://una-lang.org/en/docs/std/) (`Console`, `print`)
- Diagnostics: [U0001](https://una-lang.org/en/docs/errors/U0001/), [U0003](https://una-lang.org/en/docs/errors/U0003/), [U0101](https://una-lang.org/en/docs/errors/U0101/), [U1001](https://una-lang.org/en/docs/errors/U1001/), [U1002](https://una-lang.org/en/docs/errors/U1002/), [U1008](https://una-lang.org/en/docs/errors/U1008/), [U2001](https://una-lang.org/en/docs/errors/U2001/), [U2004](https://una-lang.org/en/docs/errors/U2004/), [U3003](https://una-lang.org/en/docs/errors/U3003/), [U3004](https://una-lang.org/en/docs/errors/U3004/), [U7002](https://una-lang.org/en/docs/errors/U7002/), [U7004](https://una-lang.org/en/docs/errors/U7004/)
- Specification: [lexical structure](https://una-lang.org/en/docs/spec/01-lexical-structure/), [functions and contracts](https://una-lang.org/en/docs/spec/04-functions-and-contracts/), [capabilities and effects](https://una-lang.org/en/docs/spec/05-capabilities-and-effects/), [requirements and examples](https://una-lang.org/en/docs/spec/08-requirements-and-examples/), [diagnostics and the command line](https://una-lang.org/en/docs/spec/13-diagnostics-and-abi/)
:::
