@MISC{Camarão05mlhas, author = {Carlos Camarão and Lucília Figueiredo}, title = { ML Has Principal Typings}, year = {2005} }

Bookmark

OpenURL

Abstract

Is there a type system for core-ML that, using exactly the same syntax of types of the Damas-Milner system, types exactly the same terms of this system, and has principal typings? In this article we answer this question affirmatively. A definition of principal typing is given, capturing the simple idea of representing the set of all typings that can be obtained in derivations for a given term in a given type system. This definition is parameterised on an ordering on types, enabling it to be used for different type systems. A type system for core-ML is presented that uses type expressions with the same form as the Damas-Milner system, and considers as well-typed the same expressions of the Damas-Milner system. A type inference algorithm is then presented, which computes principal typings with respect to the given type system.