This SkillsCast is currently only available to registered attendees of Haskell eXchange 2021: Pro Track
It will be freely available to all Skills Matter members once the Haskell eXchange 2021: Pro Track early-access window expires on January 15, 2022.
GHC's constraint solver is a notoriously difficult beast to understand, and there aren't many tools available to help us understand the process that GHC goes through while type-checking.
In this talk, we will give an overview of how GHC generates constraints in the process of type-checking, and how it goes about categorising them and solving them. In particular, we will cover:
- Wanted and Given constraints,
- GHC's classification of predicates,
- typeclass instance resolution,
- implication constraints and the recursive nature of constraint solving,
- how type-checking plugins fit in with this story.
YOU MAY ALSO LIKE:
An Overview of GHC's Constraint Solver
In 2017, having completed my mathematics PhD in London (in the field of p-adic Hodge theory), I decided to go back to my roots in the French Pyrénées, to begin working on various Haskell projects, with a focus on graphics. I got to know Haskell's type system in the process, and decided to take things a step further this year: I begun working on GHC under the supervision of Richard Eisenberg, with a focus on type-checking plugins and representation polymorphism. Since then, I've started work at Well-Typed, and continue contributing to GHC.