Programming Languages · Cluster

Type Systems

Inference, subtyping, polymorphism, and effects.

  1. 01 Unification and the Hindley–Milner Inference Algorithm How ML-family languages recover types without annotations: unification variables, the occurs check, and the level discipline that keeps generalization cheap. foundational · Aug 15, 2024
  2. 02 Let-Polymorphism and the Value Restriction Why generalizing every let binding makes mutable references unsound, how the syntactic value restriction blocks the counterexample, and what relaxed variants admit. foundational · Apr 14, 2025
  3. 03 Structural Subtyping and the Variance Lattice Why a record with more fields fits where fewer are expected, why function arguments run the other way, and why a mutable field destroys both. foundational · Feb 22, 2025
  4. 04 Row Polymorphism for Extensible Records How a row variable records the fields a function does not touch, why lack constraints are needed for extension, and what the algorithm costs. intermediate · Jul 28, 2026
  5. 05 Type Classes as Dictionary Passing and the Coherence Problem How ad-hoc polymorphism compiles to a record of functions, why instance resolution must be deterministic, and where orphan instances break the guarantee. intermediate · Mar 31, 2024
  6. 06 Erasure and Reification of Generic Types Why Java cannot ask whether a list holds strings, how erasure turns generics into casts, and what monomorphization and reification cost instead. intermediate · Jan 6, 2022
  7. 07 Bidirectional Type Checking and Where Annotations Flow Why checking a term against a known type is easier than inferring one, how the two judgments hand off to each other, and where the annotation burden returns. intermediate · Aug 19, 2026
  8. 08 Refinement Types and the SMT Obligations Behind Them How a type is refined with a predicate, why the checker emits verification conditions, and which programs a solver can and cannot decide. advanced · Dec 16, 2025
  9. 09 Algebraic Effects and Effect Rows in the Type System How a computation type records what it may do, how handlers discharge rows, and why effect polymorphism needs its own quantification. advanced · Sep 10, 2026
  10. 10 Gradual Typing, Higher-Order Casts, and Blame How a boundary between typed and untyped code is enforced by casts, why a higher-order cast must wrap functions, and how blame is assigned when one fails. advanced · Apr 14, 2026