|
|
|
James William O'Toole, Jr. and David K. Gifford.
ACM SIGPLAN Proceedings of the Conference on Programming Language Design and Implementation, Portland, Oregon, June 1989
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. First-Class Polymorphism Type reconstruction relieves the programmer of the burden of providing type information while retaining the benefits of strongly-typed languages, including superior performance, documentation, and safety. However, present systems for type reconstruction, such as the ML type system [Milner78], do not permit the use of first-class polymorphic values. Explicitly-typed languages, such as FX-87 [Gi_ord87], do permit first-class polymorphic values, but they do not provide the programmer with the convenience of implicitly-typed languages such as ML.
![]()
You can download the full text of this paper by selecting the appropriate icon: