Skip to content

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).

PartTheme
0Introduction — an inference-driven type checker / accepting input / two functions
1Literals and arithmetic (Const / type_of / check / annotate)
2Method sends and dispatch (+ a note on constant folding)
3Local variables and an immutable Scope
4Union — when a type doesn’t settle on one
5Narrowing — splitting by case
6Hash and array types (HashShape / Tuple)
7Acceptance checks and three-valued logic (accepts = :yes / :no / :maybe)
8RBS and type signatures (a table from RBS → synthesize return types from def)
9The 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.