Type Inference in the Presence of Overloading, Polymorphism and Coercions

We discuss polymorphism, overloading and coercions. A simple applicative language with these features and the data type constructors function, record, list and sum are defined. Then we introduce a formal system of deduction. It is used to fix the notion of type inference. Certain properties of the system, which are caused by the intention to base an efficient typing algorithm on it, are discussed. These properties, which are merely restrictions, then lead to considerable simplifications of the deduction system. Finally we define an algorithm which, given a term, computes a set of types for this term. This set of types is the smallest one containing a representative of every legal type t of a term, where t represents t` if t is a subtype of t`.