~/talk

Invited Talk: Type inference in OCaml and GHC using Levels

Talkat WITS 2025 · on Saturday, 2025-01-25· [functional-programming]
links:none on file
slides:none on file

Claim: both OCaml and GHC implement let-generalization using lexical levels on types or levels on variables, and those levels also power other checks (escape, constructor disambiguation, principal-mode warnings). OCaml keeps mutable levels on type graphs and represents "generic" as infinity (practically 100_000_000), eagerly unifies, and uses instance to copy-and-lower types; GHC stores TCLevel on type variables (adds an Infinity constructor), delays unification into the constraint solver when needed, and enforces the rule: generalize, promote, or error.

AI-written summary · about

  1. 0:00Introduction
  2. 1:03Talk format and levels overview
  3. 9:58Motivating example
  4. 15:58Levels in type inference
  5. 24:48Levels in OCaml compiler
  6. 33:34Generalization in OCaml
  7. 40:29Unification in OCaml
  8. 47:11Levels in GHC compiler
  9. 53:54Generalization in GHC
  10. 58:06Conclusion
~/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.