The Easiest Way to Build a Type Checker

11 points by FedericoSchonborn


osa1

As with most type checking tutorials online this also makes the fatal mistake of simplifying the checked language too much. Without some kind of polymorphism (parametric or subtyping) and local inference it's not possible to have complicated type checking anyway. If you remove the parts about polymorphism and inference from HM (modify it to use type annotations) it will also become trivial.