Results 1  10
of
21
Practical type inference for arbitraryrank types
 Journal of Functional Programming
, 2005
"... Note: This document accompanies the paper “Practical type inference for arbitraryrank types ” [6]. Prior reading of the main paper is required. 1 Contents ..."
Abstract

Cited by 98 (22 self)
 Add to MetaCart
Note: This document accompanies the paper “Practical type inference for arbitraryrank types ” [6]. Prior reading of the main paper is required. 1 Contents
HMF: Simple type inference for firstclass polymorphism
, 2008
"... HMF is a conservative extension of HindleyMilner type inference with firstclass 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 DamasMilner algorithm W. Given the relative simplicit ..."
Abstract

Cited by 16 (0 self)
 Add to MetaCart
(Show Context)
HMF is a conservative extension of HindleyMilner type inference with firstclass 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 DamasMilner 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 firstclass 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 12 (1 self)
 Add to MetaCart
(Show Context)
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
Concoqtion: Mixing dependent types and HindleyMilner type inference (extended version
, 2006
"... This paper addresses the question of how to extend OCaml’s HindleyMilner type system with types indexed by logical propositions and proofs of the Coq theorem prover, thereby providing an expressive and extensible mechanism for ensuring finegrained program invariants. We propose adopting the approa ..."
Abstract

Cited by 2 (0 self)
 Add to MetaCart
(Show Context)
This paper addresses the question of how to extend OCaml’s HindleyMilner type system with types indexed by logical propositions and proofs of the Coq theorem prover, thereby providing an expressive and extensible mechanism for ensuring finegrained 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 nontermination to the computational language, and maintaining the decidability of the type system. The extension subsumes language features such as impredicative firstclass (higherrank) polymorphism and type operators, that are notoriously difficult to integrate with the HindleyMilner 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 “orderfree ” type inference algorithm. The key enabling technology is a graph representation of constraints and a constraint solver that performs HindleyMilner inference with just three graph rewrite rules. 1
Ambivalent Types for Principal Type Inference with GADTs
"... Abstract. GADTs, short for Generalized Algebraic DataTypes, which allow constructors of algebraic datatypes to be nonsurjective, have many useful applications. However, pattern matching on GADTs introduces local type equality assumptions, which are a source of ambiguities that may destroy principal ..."
Abstract

Cited by 1 (0 self)
 Add to MetaCart
(Show Context)
Abstract. GADTs, short for Generalized Algebraic DataTypes, which allow constructors of algebraic datatypes to be nonsurjective, have many useful applications. However, pattern matching on GADTs introduces local type equality assumptions, which are a source of ambiguities that may destroy principal types— and must be resolved by type annotations. We introduce ambivalent types to tighten the definition of ambiguities and better confine them, so that type inference has principal types, remains monotonic, and requires fewer type annotations. 1
QML: Explicit FirstClass 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 coexist with ordinary ML schemes, which are in turn implicitly introduced and eliminated at letbindings 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.
Quantified Types in an . . .
"... We describe universal types, existential types, and type constructors in Cyclone, a stronglytyped Clike language. We show how the language naturally supports firstclass polymorphism and polymorphic recursion while requiring an acceptable amount of explicit type information. More importantly, we c ..."
Abstract
 Add to MetaCart
We describe universal types, existential types, and type constructors in Cyclone, a stronglytyped Clike language. We show how the language naturally supports firstclass polymorphism and polymorphic recursion while requiring an acceptable amount of explicit type information. More importantly, we consider the soundness of type variables in the presence of Cstyle mutation and the addressof operator. For polymorphic references, we describe a solution more natural for the C level than the MLstyle “value restriction.” For existential types, we discover and subsequently avoid a subtle unsoundness issue resulting from the addressof operator. We develop a formal abstract machine and typesafety proof that captures the essence of type variables at the C level.
This paper is posted at ScholarlyCommons. http://repository.upenn.edu/cis papers/275Boxy Types: Inference for HigherRank Types and
"... Languages with rich type systems are beginning to employ a blend of type inference and type checking, so that the type inference engine is guided by programmersupplied type annotations. In this paper we show, for the first time, how to combine the virtues of two wellestablished ideas: unification ..."
Abstract
 Add to MetaCart
(Show Context)
Languages with rich type systems are beginning to employ a blend of type inference and type checking, so that the type inference engine is guided by programmersupplied type annotations. In this paper we show, for the first time, how to combine the virtues of two wellestablished ideas: unificationbased inference, and bidirectional propagation of type annotations. The result is a type system that conservatively extends HindleyMilner, and yet supports both higherrank types and impredicativity. Categories and Subject Descriptors D.3.3 [PROGRAMMING