~/talk

Solving constraints during type inference

Talkat WITS 2024 · on Saturday, 2024-01-20· [compilers-and-language-design]
slides:none on file

GHC implements Pottier and Rémy’s generate-and-solve architecture: a constraint generator that walks the syntax tree and a smaller, subtler solver that resolves equalities, class constraints and implication constraints. The talk argues this reduces order-dependence and isolates complexity, shows how level numbers prevent illegal unifications, and explains evidence/coercion generation and elaboration to System F using mutable unification variables. Concrete numbers: ~11,000 LOC for generation, ~6,000 for the solver, ~9,000 for error handling. The implementation is production-ready and scales to GADTs and quantified constraints.

AI-written summary · about

  1. 0:00Introduction and monads
  2. 1:41Program elaboration
  3. 5:22The constraint approach
  4. 10:10Generating constraints
  5. 16:02Constraint solving
  6. 19:05Level numbers and implications
  7. 26:28Advanced topics and Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.