Haskell implementation of the type checker from Simon Peyton Jones's book "The Implementation of Functional Programming Languages"