Type reconstruction with first-class polymorphic values

We present the first type reconstruction system which combines the implicit typing of ML with the full power of the explicitly typed second-order polymorphic lambda calculus. The system will accept ML-style programs, explicitly typed programs, and programs that use explicit types for all first-class polymorphic values. We accomplish this flexibility by providing both generic and explicitly-quantified polymorphic types, as well as operators which convert between these two forms of polymorphism. This type reconstruction system is an integral part of the FX-89 programming language. We present a type reconstruction algorithm for the system. The type reconstruction algorithm is proven sound and complete with respect to the formal typing rules.

[1]  Parag A. Pathak,et al.  Massachusetts Institute of Technology , 1964, Nature.

[2]  J. A. Robinson,et al.  A Machine-Oriented Logic Based on the Resolution Principle , 1965, JACM.

[3]  James H. Morris,et al.  Lambda-calculus models of programming languages. , 1969 .

[4]  R. Hindley The Principal Type-Scheme of an Object in Combinatory Logic , 1969 .

[5]  John C. Reynolds,et al.  Definitional Interpreters for Higher-Order Programming Languages , 1972, ACM '72.

[6]  Robin Milner,et al.  A Theory of Type Polymorphism in Programming , 1978, J. Comput. Syst. Sci..

[7]  Nancy Jean Mccracken,et al.  An investigation of a programming language with a polymorphic type structure. , 1979 .

[8]  Warren D. Goldfarb,et al.  The Undecidability of the Second-Order Unification Problem , 1981, Theor. Comput. Sci..

[9]  Robin Milner,et al.  Principal type-schemes for functional programs , 1982, POPL '82.

[10]  Daniel Leivant,et al.  Polymorphic type inference , 1983, POPL '83.

[11]  Daniel Leivant,et al.  The Expressiveness of Simple and Second-Order Type Structures , 1983, JACM.

[12]  David B. MacQueen Modules for standard ML , 1984, LFP '84.

[13]  Luís Damas Type assignment in programming languages , 1984 .

[14]  Nancy McCracken,et al.  The Typechecking of Programs with Implicit Type Structure , 1984, Semantics of Data Types.

[15]  H. Boehm Partial polymorphic type inference is undecidable , 1985, 26th Annual Symposium on Foundations of Computer Science (sfcs 1985).

[16]  Joannes M. Lucassen Types and Effects Towards the Integration of Functional and Imperative Programming. , 1987 .

[17]  M. Tofte Operational Semantics and Polymorphic Type Inference , 1988 .

[18]  Jerzy Tiuryn,et al.  A proper extension of ML with an effective type-assignment , 1988, POPL '88.

[19]  Frank Pfenning,et al.  Partial polymorphic type inference and higher-order unification , 1988, LISP and Functional Programming.

[20]  Type Reconstruction with First-Class Polymorphic Values , 1989, PLDI.