Results 1 -
8 of
8
HMF: Simple type inference for first-class polymorphism
, 2008
"... HMF is a conservative extension of Hindley-Milner type inference with first-class polymorphism. In contrast to other proposals, HML uses regular System F types and has a simple type inference algorithm that is just a small extension of the usual Damas-Milner algorithm W. Given the relative simplicit ..."
Abstract
-
Cited by 12 (0 self)
- Add to MetaCart
HMF is a conservative extension of Hindley-Milner type inference with first-class polymorphism. In contrast to other proposals, HML uses regular System F types and has a simple type inference algorithm that is just a small extension of the usual Damas-Milner algorithm W. Given the relative simplicity and expressive power, we feel that HMF can be an attractive type system in practice. There is a reference implementation of the type system available online together with
From ML to MLF: Graphic Type Constraints with Efficient Type Inference
"... MLF is a type system that seamlessly merges ML-style type inference with System-F polymorphism. We propose a system of graphic (type) constraints that can be used to perform type inference in both ML or MLF. We show that this constraint system is a small extension of the formalism of graphic types, ..."
Abstract
-
Cited by 5 (2 self)
- Add to MetaCart
MLF is a type system that seamlessly merges ML-style type inference with System-F polymorphism. We propose a system of graphic (type) constraints that can be used to perform type inference in both ML or MLF. We show that this constraint system is a small extension of the formalism of graphic types, originally introduced to represent MLF types. We give a few semantic preserving transformations on constraints and propose a strategy for applying them to solve constraints. We show that the resulting algorithm has optimal complexity for MLF type inference, and argue that, as for ML, this complexity is linear under reasonable assumptions. Categories and Subject Descriptors D.3.3 [Programming Languages]: Language Constructs and Features—Constraints; Polymorphism;
A Church-Style Intermediate Language for MLF
"... MLF is a type system that seamlessly merges ML-style implicit but second-class polymorphism with System F explicit first-class polymorphism. We present xMLF, a Church-style version of MLF with full type information that can easily be maintained during reduction. All parameters of functions are expli ..."
Abstract
-
Cited by 1 (0 self)
- Add to MetaCart
MLF is a type system that seamlessly merges ML-style implicit but second-class polymorphism with System F explicit first-class polymorphism. We present xMLF, a Church-style version of MLF with full type information that can easily be maintained during reduction. All parameters of functions are explicitly typed and both type abstraction and type instantiation are explicit. However, type instantiation in xMLF is more general than type application in System F. We equip xMLF with a small-step reduction semantics that allows reduction in any context and show that this relation is confluent and type preserving. We also show that both subject reduction and progress hold for weak-reduction strategies, including call-byvalue with the value-restriction. We exhibit a type preserving encoding of MLF into xMLF, which ensures type soundness for the most general version of MLF. We observe that xMLF is a calculus of retyping functions at the type level.
QML: Explicit First-Class Polymorphism for ML
"... Recent years have seen a revival of interest in extending ML’s predicative type inference system with impredicative quantification in the style of System F, for which type inference is undecidable. This paper suggests a modest extension of ML with System F types: the heart of the idea is to extend t ..."
Abstract
-
Cited by 1 (0 self)
- Add to MetaCart
Recent years have seen a revival of interest in extending ML’s predicative type inference system with impredicative quantification in the style of System F, for which type inference is undecidable. This paper suggests a modest extension of ML with System F types: the heart of the idea is to extend the language of types with unary universal and existential quantifiers. The introduction and elimination of a quantified type is never inferred but indicated explicitly by the programmer by supplying the quantified type itself. Quantified types co-exist with ordinary ML schemes, which are in turn implicitly introduced and eliminated at let-bindings and use sites, respectively. The resulting language, QML, does not impose any restriction on instantiating quantified variables with quantified types; neither let- nor λ-bound variables ever require a type annotation, even if the variable’s inferred scheme or type involves quantified types. This proposal, albeit more verbose in terms of annotations than others, is simple to specify, implement, understand, and formalize.
FPH: First-class Polymorphism for Haskell Declarative, constraint-free type inference for impredicative polymorphism
"... Languages supporting polymorphism typically have ad-hoc restrictions on where polymorphic types may occur. Supporting “firstclass” polymorphism, by lifting those restrictions, is obviously desirable, but it is hard to achieve this without sacrificing type inference. We present a new type system for ..."
Abstract
- Add to MetaCart
Languages supporting polymorphism typically have ad-hoc restrictions on where polymorphic types may occur. Supporting “firstclass” polymorphism, by lifting those restrictions, is obviously desirable, but it is hard to achieve this without sacrificing type inference. We present a new type system for higher-rank and impredicative polymorphism that improves on earlier proposals: it is an extension of Damas-Milner; it relies only on System F types; it has a simple, declarative specification; it is robust to program transformations; and it enjoys a complete and decidable type inference algorithm. 1.
Bidirectional polymorphism through greed and unions
, 2008
"... Bidirectional typechecking has become a popular technique for advanced type systems. In this paper, I show how to extend past work on bidirectional typechecking to handle parametric polymorphism bidirectionally. The first key contribution is a simple bidirectional type system that supports first-cla ..."
Abstract
- Add to MetaCart
Bidirectional typechecking has become a popular technique for advanced type systems. In this paper, I show how to extend past work on bidirectional typechecking to handle parametric polymorphism bidirectionally. The first key contribution is a simple bidirectional type system that supports first-class (higher-rank and impredicative) polymorphism; its algorithm is complete for predicative polymorphism (including ML-style polymorphism and higher-rank polymorphism). The second key contribution extends that system with subtyping; the combination of bidirectional typechecking with intersection and union types fortuitously yields a simple but fairly powerful algorithm. Both of these systems, inspired by Cardelli’s early work on System F<:, rely on a “greedy ” method for finding polymorphic instances. Finally, I present a more powerful algorithm that forms intersections and unions automatically. 1
A Church-Style Intermediate Language for MLF
"... MLFis a type system that seamlessly merges ML-style implicit but second-class polymorphism with System-F explicit first-class polymorphism. We present xMLF, a Church-style version of MLF with full type information that can easily be maintained during reduction. All parameters of functions are explic ..."
Abstract
- Add to MetaCart
MLFis a type system that seamlessly merges ML-style implicit but second-class polymorphism with System-F explicit first-class polymorphism. We present xMLF, a Church-style version of MLF with full type information that can easily be maintained during reduction. All parameters of functions are explicitly typed and both type abstraction and type instantiation are explicit. However, type instantiation in xMLF is more general than type application in System F. We equip xMLF with a small-step reduction semantics that allows reduction in any context, and show that this relation is confluent and type preserving. We also show that both subject reduction and progress hold for weak-reduction strategies, including call-by-value with the value-restriction. We exhibit a type preserving encoding of MLF into xMLF, which shows that xMLF can be used as the internal language for MLF after type inference, and also ensures type soundness for the most expressive variant of MLF.

