Programming Languages · Cluster
Type Systems
Inference, subtyping, polymorphism, and effects.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.