Results 1 
3 of
3
Type Inference with Polymorphic Recursion
 Transactions on Programming Languages and Systems
, 1991
"... The DamasMilner Calculus is the typed Acalculus underlying the type system for ML and several other strongly typed polymorphic functional languages such as Mirandal and Haskell. Mycroft has extended its problematic monomorphic typing rule for recursive definitions with a polymorphic typing rule. H ..."
Abstract

Cited by 135 (0 self)
 Add to MetaCart
The DamasMilner Calculus is the typed Acalculus underlying the type system for ML and several other strongly typed polymorphic functional languages such as Mirandal and Haskell. Mycroft has extended its problematic monomorphic typing rule for recursive definitions with a polymorphic typing rule. He proved the resulting type system, which we call the MilnerMycroft Calculus, sound with respect to Milner’s semantics, and showed that it preserves the principal typing property of the DamasMilner Calculus. The extension is of practical significance in typed logic programming languages and, more generally, in any language with (mutually) recursive definitions. In this paper we show that the type inference problem for the MilnerMycroft Calculus is logspace equivalent to semiunification, the problem of solving subsumption inequations between firstorder terms. This result has been proved independently by Kfoury et al. In connection with the recently established undecidability of semiunification this implies that typability in the MilnerMycroft Calculus is undecidable. We present some reasons why type inference with polymorphic recursion appears to be practical despite its undecidability. This also sheds some light on the observed practicality of ML
A General Theory of SemiUnification
, 1993
"... Various restrictions on the terms allowed for substitution give rise to different cases of semiunification. Semiunification on finite and regular terms has already been considered in the literature. We introduce a general case of semiunification where substitutions are allowed on nonregular term ..."
Abstract
 Add to MetaCart
Various restrictions on the terms allowed for substitution give rise to different cases of semiunification. Semiunification on finite and regular terms has already been considered in the literature. We introduce a general case of semiunification where substitutions are allowed on nonregular terms, and we prove the equivalence of this general case to a wellknown undecidable data base dependency problem , thus establishing the undecidability of general semiunification. We present a unified way of looking at the various problems of semiunification. We give some properties that are common to all the cases of semiunification. We also the principality property and the solution set for those problems. We prove that semiunification on general terms has the principality property. Finally, we present a recursive inseparability result between semiunification on regular terms and semiunification on general terms. Partly supported by NSF grant CCR9113196. Address: Department of Compu...
Extending the Type Checker of SML by Polymorphic Recursion: A Correctness Proof
, 1997
"... . We describe an extension of the type inference of Standard ML that covers polymorphic recursion. For any term t of SML, a type scheme ø and a system L of inequations between (simple) types is computed, such that the types of t are the instances of ø by substitutions S that satisfy L. The inequat ..."
Abstract
 Add to MetaCart
. We describe an extension of the type inference of Standard ML that covers polymorphic recursion. For any term t of SML, a type scheme ø and a system L of inequations between (simple) types is computed, such that the types of t are the instances of ø by substitutions S that satisfy L. The inequation constraints L are computed bottomup in a modification of Milner's algorithm W . The correctness proof is complicated by the fact that unknowns for polytypes are needed  in contrast to type inference for SML. 1 Introduction Functional programming languages like ML[19], Miranda[23], or Haskell[?], have made statically typed polymorphic languages popular. Their success depends to a large extend on the following properties of the underlying type system of Damas/Milner[2]:  typability of an untyped term is decidable,  for typable terms, a schema representing the set of its types can be inferred automatically,  the declaration of polymorphic values by the user is supported,  welltyped...