Hindley-Milner type inference