Results 1 - 10
of
12
A graphical presentation of MLF types with a linear-time unification algorithm
- In TLDI’07: Proceedings of the 2007 ACM SIGPLAN International Workshop on Types in Languages Design and Implementation
, 2007
"... apport de recherche ISSN 0249-6399 ISRN INRIA/RR--????--FR+ENG A graphical presentation of MLF types with a linear-time local unification algorithm. ..."
Abstract
-
Cited by 14 (7 self)
- Add to MetaCart
apport de recherche ISSN 0249-6399 ISRN INRIA/RR--????--FR+ENG A graphical presentation of MLF types with a linear-time local unification algorithm.
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
Flexible types: robust type inference for first-class polymorphism
- In Proceedings of the 36th ACM Symposium on Principles of Programming Languages (POPL’09
, 2009
"... We present HML, a type inference system that supports full firstclass polymorphism where few annotations are needed: only function parameters with a polymorphic type need to be annotated. HML is a simplification of MLF where only flexibly quantified types are used. This makes the types easier to wor ..."
Abstract
-
Cited by 9 (1 self)
- Add to MetaCart
We present HML, a type inference system that supports full firstclass polymorphism where few annotations are needed: only function parameters with a polymorphic type need to be annotated. HML is a simplification of MLF where only flexibly quantified types are used. This makes the types easier to work with from a programmers perspective, and simplifies the implementation of the type inference algorithm. Still, HML retains much of the expressiveness of MLF, it is robust with respect to small program transformations, and has a simple specification of the type rules with an effective type inference algorithm that infers principal types. A small reference implementation with many examples is
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;
Greedy Bidirectional Polymorphism
, 2009
"... Bidirectional typechecking has become popular in advanced type systems because it works in many situations where inference is undecidable. In this paper, I show how to cleanly handle parametric polymorphism in a bidirectional setting. The key contribution is a bidirectional type system for a subset ..."
Abstract
-
Cited by 3 (2 self)
- Add to MetaCart
Bidirectional typechecking has become popular in advanced type systems because it works in many situations where inference is undecidable. In this paper, I show how to cleanly handle parametric polymorphism in a bidirectional setting. The key contribution is a bidirectional type system for a subset of ML that supports first-class (higher-rank and even impredicative) polymorphism, and is complete for predicative polymorphism (including ML-style polymorphism and higher-rank polymorphism). The system’s power comes from bidirectionality combined with a “greedy ” method of finding polymorphic instances inspired by Cardelli’s early work on System F<:. This work demonstrates that bidirectionality is a good foundation for traditionally vexing features like first-class polymorphism.
Concoqtion: Mixing dependent types and Hindley-Milner type inference (extended version
, 2006
"... This paper addresses the question of how to extend OCaml’s Hindley-Milner type system with types indexed by logical propositions and proofs of the Coq theorem prover, thereby providing an expressive and extensible mechanism for ensuring fine-grained program invariants. We propose adopting the approa ..."
Abstract
-
Cited by 2 (0 self)
- Add to MetaCart
This paper addresses the question of how to extend OCaml’s Hindley-Milner type system with types indexed by logical propositions and proofs of the Coq theorem prover, thereby providing an expressive and extensible mechanism for ensuring fine-grained program invariants. We propose adopting the approached used by Shao et al. for certified binaries. This approach maintains a phase distinction between the computational and logical languages, thereby limiting effects and non-termination to the computational language, and maintaining the decidability of the type system. The extension subsumes language features such as impredicative first-class (higher-rank) polymorphism and type operators, that are notoriously difficult to integrate with the Hindley-Milner style of type inference that is used in OCaml. We make the observation that these features can be more easily integrated with type inference if the inference algorithm is free to adapt the order in which it solves typing constraints to each program. To this end we define a novel “order-free ” type inference algorithm. The key enabling technology is a graph representation of constraints and a constraint solver that performs Hindley-Milner inference with just three graph rewrite rules. 1
Type inference for generic Haskell
, 2005
"... Abstract. The more expressive a type system, the more type information has to be provided in a program. Having to provide a type is sometimes a pain, but lacking expressivity is often even worse. There is a continuous struggle between expressivity and (type-)verbosity. However, even very expressive ..."
Abstract
-
Cited by 1 (0 self)
- Add to MetaCart
Abstract. The more expressive a type system, the more type information has to be provided in a program. Having to provide a type is sometimes a pain, but lacking expressivity is often even worse. There is a continuous struggle between expressivity and (type-)verbosity. However, even very expressive type systems allow type inference for parts of a program. Generic Haskell is an extension of Haskell that supports defining generic functions. Generic Haskell assumes that the type of a generic function is explicitly specified. This is often no problem, but sometimes it is rather painful to have to specify a type – in particular for generic functions with many dependencies – and sometimes the specified type can be generalized. In this paper, we identify three type inference problems specific to generic functions, and present (partial) solutions to each of them. 1
Draft version
, 2008
"... apport de recherche ISSN 0249-6399 ISRN INRIA/RR--????--FR+ENGA graphical presentation of MLF types with a linear-time local unification algorithm. ..."
Abstract
- Add to MetaCart
apport de recherche ISSN 0249-6399 ISRN INRIA/RR--????--FR+ENGA graphical presentation of MLF types with a linear-time local unification algorithm.
True Higher-Order Modules, Separate Compilation, and Signature Calculi ∗
, 2009
"... In the past three decades, the ML module system has been the focal point of tremendous interest in the research community. The combination of parameterized modules and fine-grain data abstraction control have proven to be quite powerful in practice. Mainstream languages have slowly adopted features ..."
Abstract
- Add to MetaCart
In the past three decades, the ML module system has been the focal point of tremendous interest in the research community. The combination of parameterized modules and fine-grain data abstraction control have proven to be quite powerful in practice. Mainstream languages have slowly adopted features inspired by the ML module system. However, programmers have run into various limitations and complexities in implementations of the ML module system. In the presence of common extensions such as true higher-order modules, true separate compilation becomes a problem. This conflict reflects a fundamental tension in module system design. Module systems should both propagate as much type information across module boundaries as is unconstrained by the programmer and be able to separately typecheck modules. 1

