Results 1  10
of
24
Lazy functional state threads
 In the ACM SIGPLAN Conference on Programming Language Design and Implementation
, 1994
"... Some algorithms make critical internal use of updatable state, even though their external specification is purely functional. Based on earlier work on monads, we present a way of securely encapsulating stateful computations that manipulate multiple, named, mutable objects, in the context of a nonst ..."
Abstract

Cited by 108 (11 self)
 Add to MetaCart
Some algorithms make critical internal use of updatable state, even though their external specification is purely functional. Based on earlier work on monads, we present a way of securely encapsulating stateful computations that manipulate multiple, named, mutable objects, in the context of a nonstrict, purelyfunctional language. The security of the encapsulation is assured by the type system, using parametricity. Intriguingly, this parametricity requires the provision of a (single) constant with a rank2 polymorphic type. 1
Putting Type Annotations to Work
, 1996
"... We study an extension of the HindleyMilner system with explicit type scheme annotations and type declarations. The system can express polymorphic function arguments, userdefined data types with abstract components, and structure types with polymorphic fields. More generally, all programs of the po ..."
Abstract

Cited by 96 (1 self)
 Add to MetaCart
We study an extension of the HindleyMilner system with explicit type scheme annotations and type declarations. The system can express polymorphic function arguments, userdefined data types with abstract components, and structure types with polymorphic fields. More generally, all programs of the polymorphic lambda calculus can be encoded by a translation between typing derivations. We show that type reconstruction in this system can be reduced to the decidable problem of firstorder unification under a mixed prefix.
What Are Principal Typings and What Are They Good For?
, 1995
"... We demonstrate the pragmatic value of the principal typing property, a property more general than ML's principal type property, by studying a type system with principal typings. The type system is based on rank 2 intersection types and is closely related to ML. Its principal typing property ..."
Abstract

Cited by 93 (0 self)
 Add to MetaCart
We demonstrate the pragmatic value of the principal typing property, a property more general than ML's principal type property, by studying a type system with principal typings. The type system is based on rank 2 intersection types and is closely related to ML. Its principal typing property provides elegant support for separate compilation, including "smartest recompilation" and incremental type inference, and for accurate type error messages. Moreover, it motivates a novel rule for typing recursive definitions that can type many examples of polymorphic recursion.
Partial polymorphic type inference and higherorder unification
 IN PROCEEDINGS OF THE 1988 ACM CONFERENCE ON LISP AND FUNCTIONAL PROGRAMMING, ACM
, 1988
"... We show that the problem of partial type inference in the nthborder polymorphic Xcalculus is equivalent to nthorder unification. On the one hand, this means that partial type inference in polymorphic Xcalculi of order 2 or higher is undecidable. On the other hand, higherorder unification is oft ..."
Abstract

Cited by 83 (8 self)
 Add to MetaCart
We show that the problem of partial type inference in the nthborder polymorphic Xcalculus is equivalent to nthorder unification. On the one hand, this means that partial type inference in polymorphic Xcalculi of order 2 or higher is undecidable. On the other hand, higherorder unification is often tractable in practice, and our translation entails a very useful algorithm for partial type inference in the worder polymorphic Xcalculus. We present an implementation in AProlog in full.
A direct algorithm for type inference in the rank2 fragment of the secondorder λcalculus
, 1993
"... We study the problem of type inference for a family of polymorphic type disciplines containing the power of CoreML. This family comprises all levels of the stratification of the secondorder lambdacalculus by "rank" of types. We show that typability is an undecidable problem at every ran ..."
Abstract

Cited by 78 (14 self)
 Add to MetaCart
We study the problem of type inference for a family of polymorphic type disciplines containing the power of CoreML. This family comprises all levels of the stratification of the secondorder lambdacalculus by "rank" of types. We show that typability is an undecidable problem at every rank k >= 3 of this stratification. While it was already known that typability is decidable at rank 2, no direct and easytoimplement algorithm was available. To design such an algorithm, we develop a new notion of reduction and show howto use it to reduce the problem of typability at rank 2 to the problem of acyclic semiunification. A byproduct of our analysis is the publication of a simple solution procedure for acyclic semiunification.
De Bruijn notation as a nested datatype
 Journal of Functional Programming
, 1999
"... “I have no data yet. It is a capital mistake to theorise before one has data.” ..."
Abstract

Cited by 68 (2 self)
 Add to MetaCart
“I have no data yet. It is a capital mistake to theorise before one has data.”
Typability and Type Checking in System F Are Equivalent and Undecidable
 Annals of Pure and Applied Logic
, 1998
"... Girard and Reynolds independently invented System F (a.k.a. the secondorder polymorphically typed lambda calculus) to handle problems in logic and computer programming language design, respectively. Viewing F in the Curry style, which associates types with untyped lambda terms, raises the questions ..."
Abstract

Cited by 60 (4 self)
 Add to MetaCart
Girard and Reynolds independently invented System F (a.k.a. the secondorder polymorphically typed lambda calculus) to handle problems in logic and computer programming language design, respectively. Viewing F in the Curry style, which associates types with untyped lambda terms, raises the questions of typability and type checking . Typability asks for a term whether there exists some type it can be given. Type checking asks, for a particular term and type, whether the term can be given that type. The decidability of these problems has been settled for restrictions and extensions of F and related systems and complexity lowerbounds have been determined for typability in F, but this report is the rst to resolve whether these problems are decidable for System F. This report proves that type checking in F is undecidable, by a reduction from semiuni cation, and that typability in F is undecidable, by a reduction from type checking. Because there is an easy reduction from typability to typ...
Generalised Folds for Nested Datatypes
 Formal Aspects of Computing
, 1999
"... Nested datatypes generalise regular datatypes in much the same way that contextfree languages generalise regular ones. Although the categorical semantics of nested types turns out to be similar to the regular case, the fold functions are more limited because they can only describe natural transform ..."
Abstract

Cited by 35 (1 self)
 Add to MetaCart
Nested datatypes generalise regular datatypes in much the same way that contextfree languages generalise regular ones. Although the categorical semantics of nested types turns out to be similar to the regular case, the fold functions are more limited because they can only describe natural transformations. Practical considerations therefore dictate the introduction of a generalised fold function in which this limitation can be overcome. In the paper we show how to construct generalised folds systematically for each nested datatype, and show that they possess a uniqueness property analogous to that of ordinary folds. As a consequence, generalised folds satisfy fusion properties similar to those developed for regular datatypes. Such properties form the core of an effective calculational theory of inductive datatypes.
Generalizing Generalized Tries
, 1999
"... A trie is a search tree scheme that employs the structure of search keys to organize information. Tries were originally devised as a means to represent a collection of records indexed by strings over a fixed alphabet. Based on work by C.P. Wadsworth and others, R.H. Connelly and F.L. Morris generali ..."
Abstract

Cited by 31 (8 self)
 Add to MetaCart
A trie is a search tree scheme that employs the structure of search keys to organize information. Tries were originally devised as a means to represent a collection of records indexed by strings over a fixed alphabet. Based on work by C.P. Wadsworth and others, R.H. Connelly and F.L. Morris generalized the concept to permit indexing by elements of an arbitrary monomorphic datatype. Here we go one step further and define tries and operations on tries generically for arbitrary firstorder polymorphic datatypes. The derivation is based on techniques recently developed in the context of polytypic programming. It is well known that for the implementation of generalized tries nested datatypes and polymorphic recursion are needed. Implementing tries for polymorphic datatypes places even greater demands on the type system: it requires rank2 type signatures and higherorder polymorphic nested datatypes. Despite these requirements the definition of generalized tries for polymorphic datatypes is...
On the undecidability of partial polymorphic type reconstruction
 FUNDAMENTA INFORMATICAE
, 1992
"... We prove that partial type reconstruction for the pure polymorphic *calculus is undecidable by a reduction from the secondorder unification problem, extending a previous result by H.J. Boehm. We show further that partial type reconstruction remains undecidable even in a very small predicative f ..."
Abstract

Cited by 27 (0 self)
 Add to MetaCart
We prove that partial type reconstruction for the pure polymorphic *calculus is undecidable by a reduction from the secondorder unification problem, extending a previous result by H.J. Boehm. We show further that partial type reconstruction remains undecidable even in a very small predicative fragment of the polymorphic *calculus, which implies undecidability of partial type reconstruction for * ML as introduced by Harper, Mitchell, and Moggi.