Haskell implementation of "Hindley-Milner Elaboration in Applicative Style"