Results 1  10
of
58
Simple unificationbased type inference for GADTs
, 2006
"... Generalized algebraic data types (GADTs), sometimes known as “guarded recursive data types ” or “firstclass phantom types”, are a simple but powerful generalization of the data types of Haskell and ML. Recent works have given compelling examples of the utility of GADTs, although type inference is k ..."
Abstract

Cited by 168 (35 self)
 Add to MetaCart
Generalized algebraic data types (GADTs), sometimes known as “guarded recursive data types ” or “firstclass phantom types”, are a simple but powerful generalization of the data types of Haskell and ML. Recent works have given compelling examples of the utility of GADTs, although type inference is known to be difficult. Our contribution is to show how to exploit programmersupplied type annotations to make the type inference task almost embarrassingly easy. Our main technical innovation is wobbly types, which express in a declarative way the uncertainty caused by the incremental nature of typical typeinference algorithms.
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
System F with type equality coercions
, 2007
"... We introduce System FC, which extends System F with support for nonsyntactic type equality. There are two main extensions: (i) explicit witnesses for type equalities, and (ii) open, nonparametric type functions, given meaning by toplevel equality axioms. Unlike System F, FC is expressive enough to ..."
Abstract

Cited by 85 (28 self)
 Add to MetaCart
We introduce System FC, which extends System F with support for nonsyntactic type equality. There are two main extensions: (i) explicit witnesses for type equalities, and (ii) open, nonparametric type functions, given meaning by toplevel equality axioms. Unlike System F, FC is expressive enough to serve as a target for several different sourcelanguage features, including Haskell’s newtype, generalised algebraic data types, associated types, functional dependencies, and perhaps more besides.
Languages of the Future
 In OOPSLA ’04: Companion to the 19th annual ACM SIGPLAN conference on Objectoriented programming systems, languages, and applications
, 2004
"... This paper explores a new point in the design space of formal reasoning systems  part programming language, part logical framework. The system is built on a programming language where the user expresses equality constraints between types and the type checker then enforces these constraints. This si ..."
Abstract

Cited by 74 (3 self)
 Add to MetaCart
This paper explores a new point in the design space of formal reasoning systems  part programming language, part logical framework. The system is built on a programming language where the user expresses equality constraints between types and the type checker then enforces these constraints. This simple extension to the type system allows the programmer to describe properties of his program in the types of witness objects which can be thought of as concrete evidence that the program has the property desired. These techniques and two other rich typing mechanisms, rankN polymorphism and extensible kinds, create a powerful new programming idiom for writing programs whose types enforce semantic properties. A language with these features is both a practical programming language and a logic. This marriage between two previously separate entities increases the probability that users will apply formal methods to their programming designs. This kind of synthesis creates the foundations for the languages of the future.
Strongly typed heterogeneous collections
 In Haskell ’04: Proceedings of the ACM SIGPLAN workshop on Haskell
, 2004
"... A heterogeneous collection is a datatype that is capable of storing data of different types, while providing operations for lookup, update, iteration, and others. There are various kinds of heterogeneous collections, differing in representation, invariants, and access operations. We describe HLIST ..."
Abstract

Cited by 59 (12 self)
 Add to MetaCart
A heterogeneous collection is a datatype that is capable of storing data of different types, while providing operations for lookup, update, iteration, and others. There are various kinds of heterogeneous collections, differing in representation, invariants, and access operations. We describe HLIST — a Haskell library for strongly typed heterogeneous collections including extensible records. We illustrate HLIST’s benefits in the context of typesafe database access in Haskell. The HLIST library relies on common extensions of Haskell 98. Our exploration raises interesting issues regarding Haskell’s type system, in particular, avoidance of overlapping instances, and reification of type equality and type unification.
A history of Haskell: Being lazy with class
 In Proceedings of the 3rd ACM SIGPLAN Conference on History of Programming Languages (HOPLIII
, 2007
"... This paper describes the history of Haskell, including its genesis and principles, technical contributions, implementations and tools, and applications and impact. 1. ..."
Abstract

Cited by 57 (3 self)
 Add to MetaCart
This paper describes the history of Haskell, including its genesis and principles, technical contributions, implementations and tools, and applications and impact. 1.
Wobbly types: type inference for generalised algebraic data types
, 2004
"... Generalised algebraic data types (GADTs), sometimes known as “guarded recursive data types ” or “firstclass phantom types”, are a simple but powerful generalisation of the data types of Haskell and ML. Recent works have given compelling examples of the utility of GADTs, although type inference is k ..."
Abstract

Cited by 51 (2 self)
 Add to MetaCart
Generalised algebraic data types (GADTs), sometimes known as “guarded recursive data types ” or “firstclass phantom types”, are a simple but powerful generalisation of the data types of Haskell and ML. Recent works have given compelling examples of the utility of GADTs, although type inference is known to be difficult. It is time to pluck the fruit. Can GADTs be added to Haskell, without losing type inference, or requiring unacceptably heavy type annotations? Can this be done without completely rewriting the alreadycomplex Haskell typeinference engine, and without complex interactions with (say) type classes? We answer these questions in the affirmative, giving a type system that explains just what type annotations are required, and a prototype implementation that implements it. Our main technical innovation is wobbly types, which express in a declarative way the uncertainty caused by the incremental nature of typical typeinference algorithms. 1
Finally Tagless, Partially Evaluated  Tagless Staged Interpreters for Simpler Typed Languages
"... We have built the first family of tagless interpretations for a higherorder typed object language in a typed metalanguage (Haskell or ML) that require no dependent types, generalized algebraic data types, or postprocessing to eliminate tags. The statically typepreserving interpretations include an ..."
Abstract

Cited by 33 (7 self)
 Add to MetaCart
We have built the first family of tagless interpretations for a higherorder typed object language in a typed metalanguage (Haskell or ML) that require no dependent types, generalized algebraic data types, or postprocessing to eliminate tags. The statically typepreserving interpretations include an evaluator, a compiler (or staged evaluator), a partial evaluator, and callbyname and callbyvalue CPS transformers. Our main idea is to encode HOAS using cogen functions rather than data constructors. In other words, we represent object terms not in an initial algebra but using the coalgebraic structure of the λcalculus. Our representation also simulates inductive maps from types to types, which are required for typed partial evaluation and CPS transformations. Our encoding of an object term abstracts over the various ways to interpret it, yet statically assures that the interpreters never get stuck. To achieve selfinterpretation and show Jonesoptimality, we relate this exemplar of higherrank and higherkind polymorphism to plugging a term into a context of letpolymorphic bindings.
A framework for extended algebraic data types
 In Proc. of FLOPS’06, volume 3945 of LNCS
, 2006
"... Abstract. There are a number of extended forms of algebraic data types such as type classes with existential types and generalized algebraic data types. Such extensions are highly useful but their interaction has not been studied formally so far. Here, we present a unifying framework for these exten ..."
Abstract

Cited by 23 (10 self)
 Add to MetaCart
Abstract. There are a number of extended forms of algebraic data types such as type classes with existential types and generalized algebraic data types. Such extensions are highly useful but their interaction has not been studied formally so far. Here, we present a unifying framework for these extensions. We show that the combination of type classes and generalized algebraic data types allows us to express a number of interesting properties which are desired by programmers. We support type checking based on a novel constraint solver. Our results show that our system is practical and greatly extends the expressive power of languages such as Haskell and ML. 1
Strongly typed rewriting for coupled software transformation
 Proc. 7th Int. Workshop on RuleBased Programming (RULE 2006), ENTCS
, 2006
"... Coupled transformations occur in software evolution when multiple artifacts must be modified in such a way that they remain consistent with each other. An important example involves the coupled transformation of a data type, its instances, and the programs that consume or produce it. Previously, we ..."
Abstract

Cited by 15 (6 self)
 Add to MetaCart
Coupled transformations occur in software evolution when multiple artifacts must be modified in such a way that they remain consistent with each other. An important example involves the coupled transformation of a data type, its instances, and the programs that consume or produce it. Previously, we have provided a formal treatment of transformation of the first two: data types and instances. The treatment involved the construction of typesafe, typechanging strategic rewrite systems. In this paper, we extend our treatment to the transformation of corresponding data processing programs. The key insight underlying the extension is that both data migration functions and data processors can be represented typesafely by a generalized abstract data type (GADT). These representations are then subjected to program calculation rules, harnessed in typesafe, typepreserving strategic rewrite systems. For ease of calculation, we use pointfree representations and corresponding calculation rules. Thus, coupled transformations are carried out in two steps. First, a typechanging rewrite system is applied to a source type to obtain a target type together with (representations of) migration functions between source and target. Then, a typepreserving rewrite system is applied to the composition of a migration function and a data processor on the source (or target) type to obtain a data processor on the target (or source) type. All rewrites are typesafe. Key words: Program transformation, term rewriting, strategic programming, generalized abstract datatypes, data refinement.