The Little chibirigor
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 (motivation, audience, setup). Terms are in the glossary; cross-volume references live in the appendices. 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).
Chapters
Section titled “Chapters”| Part | Theme |
|---|---|
| 0 | Introduction — an inference-driven type checker / accepting input / two functions |
| 1 | Literals and arithmetic (Const / type_of / check / annotate) |
| 2 | Method sends and dispatch (+ a note on constant folding) |
| 3 | Local variables and an immutable Scope |
| 4 | Union — when a type doesn’t settle on one |
| 5 | Narrowing — splitting by case |
| 6 | Hash and array types (HashShape / Tuple) |
| 7 | Acceptance checks and three-valued logic (accepts = :yes / :no / :maybe) |
| 8 | RBS and type signatures (a table from RBS → synthesize return types from def) |
| 9 | The philosophy of gradual typing (finale) |
When you’re done, continue to the Seasoned chibirigor — the “read it” volume.
© 2026 TypedDuck. Licensed under CC BY-SA 4.0.