# The Little chibirigor
Source: https://rigor.typedduck.fail/chibirigor/little/

The Little volume teaches the smallest Ruby type checker, `chibirigor`, **by building it**
step by step. Across Part 0 through Part 9 we build a minimal implementation where `check`
(type diagnostics) and `annotate` (show the inferred types) work. **The code runs to
completion within this volume**; the formal theory is handed to the Seasoned volume.

> New here? Start at the shared [README](/chibirigor/) (motivation, audience, setup). Terms
> are in the [glossary](/chibirigor/glossary/); cross-volume references live in the
> [appendices](/chibirigor/appendix/a1-special-types/). Each chapter is written from three perspectives — "① type
> theory ↔ ② Ruby/RBS ↔ ③ Rigor's implementation" — and ends with exercises (the full
> reading of the three perspectives is in [Part 0](/chibirigor/little/part0-introduction/)).

## Chapters

| Part | Theme |
|---|---|
| [0](/chibirigor/little/part0-introduction/) | Introduction — an inference-driven type checker / accepting input / two functions |
| [1](/chibirigor/little/part1-literals-and-arithmetic/) | Literals and arithmetic (`Const` / `type_of` / `check` / `annotate`) |
| [2](/chibirigor/little/part2-method-dispatch/) | Method sends and dispatch (+ a note on constant folding) |
| [3](/chibirigor/little/part3-scope-and-statements/) | Local variables and an immutable Scope |
| [4](/chibirigor/little/part4-union/) | Union — when a type doesn't settle on one |
| [5](/chibirigor/little/part5-narrowing/) | Narrowing — splitting by case |
| [6](/chibirigor/little/part6-hash-and-tuple/) | Hash and array types (`HashShape` / `Tuple`) |
| [7](/chibirigor/little/part7-accepts-and-trinary/) | Acceptance checks and three-valued logic (`accepts` = `:yes` / `:no` / `:maybe`) |
| [8](/chibirigor/little/part8-rbs-and-signatures/) | RBS and type signatures (a table from RBS → synthesize return types from `def`) |
| [9](/chibirigor/little/part9-gradual-philosophy/) | The philosophy of gradual typing (finale) |

When you're done, continue to the [Seasoned chibirigor](/chibirigor/seasoned/) — the **"read
it"** volume.
