|Playlist||schedule page slides as PDF|
Inference 1 — introduction (1:37)
Introduction to type inference.
Inference 2 — type inference (3:06)
Basic type inference in action.
Inference 3 — function calls (2:11)
Type inference for function calls.
Inference 4 — occurs check (1:43)
Type inference needs to avoid creating cyclic type equivalences, which could otherwise happen for expressions that have no type.
The unify! function will replace any use of equal? in the type checker, and it needs a resolve helper function.
Representing type variables in our new, inferencing type checker.
Examples for the unify! function.
Inference 8 — unification (4:06)
Unification is the algorithm for assigning types to type variables. The unify! function will need to implement this algorithm.
Inference 9 — unify! (3:46)
Inference 10 — typecheck (2:41)
Updating typecheck to use unify!. See infer-lambda.rkt.
Type errors with unification can’t point to one wrong expression, but they can report a mismatch and one or more relevant expressions.