Type inference as constraint solving: how GHC’s type inference engine actually works
The Haskell compiler GHC includes a type inference engine for a rather sophisticated type system. You might worry that a complicated type system leads to a very complicated type inference engine. You’d be right, but we have learned a lot about how to structure type inference so that the complexity does not get out of control.
In this talk, given at Zurihac 2019 (opens in new tab), I explain how GHC’s type inference engine actually works by first generating constraints and then solving them.
Here are
- Video of my talk at ZuriHac 2019 (opens in new tab), sadly missing the end part of the talk
- Video of the same talk at Lambdale 2019 (opens in new tab) (in a pub!)
- Slides from the talk