Results 1  10
of
28
Foundations for structured programming with GADTs
 Conference record of the ACM SIGPLANSIGACT Symposium on Principles of Programming Languages
, 2008
"... GADTs are at the cutting edge of functional programming and become more widely used every day. Nevertheless, the semantic foundations underlying GADTs are not well understood. In this paper we solve this problem by showing that the standard theory of data types as carriers of initial algebras of fun ..."
Abstract

Cited by 22 (4 self)
 Add to MetaCart
GADTs are at the cutting edge of functional programming and become more widely used every day. Nevertheless, the semantic foundations underlying GADTs are not well understood. In this paper we solve this problem by showing that the standard theory of data types as carriers of initial algebras of functors can be extended from algebraic and nested data types to GADTs. We then use this observation to derive an initial algebra semantics for GADTs, thus ensuring that all of the accumulated knowledge about initial algebras can be brought to bear on them. Next, we use our initial algebra semantics for GADTs to derive expressive and principled tools — analogous to the wellknown and widelyused ones for algebraic and nested data types — for reasoning about, programming with, and improving the performance of programs involving, GADTs; we christen such a collection of tools for a GADT an initial algebra package. Along the way, we give a constructive demonstration that every GADT can be reduced to one which uses only the equality GADT and existential quantification. Although other such reductions exist in the literature, ours is entirely local, is independent of any particular syntactic presentation of GADTs, and can be implemented in the host language, rather than existing solely as a metatheoretical artifact. The main technical ideas underlying our approach are (i) to modify the notion of a higherorder functor so that GADTs can be seen as carriers of initial algebras of higherorder functors, and (ii) to use left Kan extensions to trade arbitrary GADTs for simplerbutequivalent ones for which initial algebra semantics can be derived.
The Power of Pi
, 2008
"... This paper exhibits the power of programming with dependent types by dint of embedding three domainspecific languages: Cryptol, a language for cryptographic protocols; a small data description language; and relational algebra. Each example demonstrates particular design patterns inherent to depende ..."
Abstract

Cited by 17 (0 self)
 Add to MetaCart
This paper exhibits the power of programming with dependent types by dint of embedding three domainspecific languages: Cryptol, a language for cryptographic protocols; a small data description language; and relational algebra. Each example demonstrates particular design patterns inherent to dependentlytyped programming. Documenting these techniques paves the way for further research in domainspecific embedded type systems.
Exploring the regular tree types
 In Types for Proofs and Programs
, 2004
"... Abstract. In this paper we use the Epigram language to define the universe of regular tree types—closed under empty, unit, sum, product and least fixpoint. We then present a generic decision procedure for Epigram’s inbuilt equality at each type, taking a complementary approach to that of Benke, Dyb ..."
Abstract

Cited by 16 (3 self)
 Add to MetaCart
Abstract. In this paper we use the Epigram language to define the universe of regular tree types—closed under empty, unit, sum, product and least fixpoint. We then present a generic decision procedure for Epigram’s inbuilt equality at each type, taking a complementary approach to that of Benke, Dybjer and Jansson [7]. We also give a generic definition of map, taking our inspiration from Jansson and Jeuring [21]. Finally, we equip the regular universe with the partial derivative which can be interpreted functionally as Huet’s notion of ‘zipper’, as suggested by McBride in [27] and implemented (without the fixpoint case) in Generic Haskell by Hinze, Jeuring and Löh [18]. We aim to show through these examples that generic programming can be ordinary programming in a dependently typed language. 1
Comparing approaches to generic programming in Haskell
 ICS, Utrecht University
, 2006
"... Abstract. The last decade has seen a number of approaches to datatypegeneric programming: PolyP, Functorial ML, ‘Scrap Your Boilerplate’, Generic Haskell, ‘Generics for the Masses’, etc. The approaches vary in sophistication and target audience: some propose fullblown programming languages, some s ..."
Abstract

Cited by 14 (4 self)
 Add to MetaCart
Abstract. The last decade has seen a number of approaches to datatypegeneric programming: PolyP, Functorial ML, ‘Scrap Your Boilerplate’, Generic Haskell, ‘Generics for the Masses’, etc. The approaches vary in sophistication and target audience: some propose fullblown programming languages, some suggest libraries, some can be seen as categorical programming methods. In these lecture notes we compare the various approaches to datatypegeneric programming in Haskell. We introduce each approach by means of example, and we evaluate it along different dimensions (expressivity, ease of use, etc). 1
A Dependently Typed Framework for Static Analysis of Program Execution Costs
 In Revised selected papers from IFL 2005: 17th international workshop on implementation and application of functional languages
, 2005
"... Abstract. This paper considers the use of dependent types to capture information about dynamic resource usage in a static type system. Dependent types allow us to give (explicit) proofs of properties with a program; we present a dependently typed core language ��, and define a framework within this ..."
Abstract

Cited by 13 (9 self)
 Add to MetaCart
Abstract. This paper considers the use of dependent types to capture information about dynamic resource usage in a static type system. Dependent types allow us to give (explicit) proofs of properties with a program; we present a dependently typed core language ��, and define a framework within this language for representing size metrics and their properties. We give several examples of size bounded programs within this framework and show that we can construct proofs of their size bounds within ��. We further show how the framework handles recursive higher order functions and sum types, and contrast our system with previous work based on sized types. 1
P.: Dependent types at work
 LerNet 2008. LNCS
, 2009
"... Abstract. In these lecture notes we give an introduction to functional programming with dependent types. We use the dependently typed programming language Agda which is an extension of MartinLöf type theory. First we show how to do simply typed functional programming in the style of Haskell and ML. ..."
Abstract

Cited by 11 (1 self)
 Add to MetaCart
Abstract. In these lecture notes we give an introduction to functional programming with dependent types. We use the dependently typed programming language Agda which is an extension of MartinLöf type theory. First we show how to do simply typed functional programming in the style of Haskell and ML. Some differences between Agda’s type system and the HindleyMilner type system of Haskell and ML are also discussed. Then we show how to use dependent types for programming and we explain the basic ideas behind typechecking dependent types. We go on to explain the CurryHoward identification of propositions and types. This is what makes Agda a programming logic and not only a programming language. According to CurryHoward, we identify programs and proofs, something which is possible only by requiring that all program terminate. However, at the end of these notes we present a method for encoding partial and general recursive functions as total functions using dependent types.
Why dependent types matter
 In preparation, http://www.epig.org/downloads/ydtm.pdf
, 2005
"... We exhibit the rationale behind the design of Epigram, a dependently typed programming language and interactive program development system, using refinements of a well known program—merge sort—as a running example. We discuss its relationship with other proposals to introduce aspects of dependent ty ..."
Abstract

Cited by 9 (2 self)
 Add to MetaCart
We exhibit the rationale behind the design of Epigram, a dependently typed programming language and interactive program development system, using refinements of a well known program—merge sort—as a running example. We discuss its relationship with other proposals to introduce aspects of dependent types into functional programming languages and sketch some topics for further work in this area. 1.
A modular typechecking algorithm for type theory with singleton types and proof irrelevance
 IN TLCA’09, VOLUME 5608 OF LNCS
, 2009
"... ..."
A few constructions on constructors
 Types for Proofs and Programs
, 2005
"... Abstract. We present four constructions for standard equipment which can be generated for every inductive datatype: case analysis, structural recursion, no confusion, acyclicity. Our constructions follow a twolevel approach—they require less work than the standard techniques which inspired them [11 ..."
Abstract

Cited by 7 (5 self)
 Add to MetaCart
Abstract. We present four constructions for standard equipment which can be generated for every inductive datatype: case analysis, structural recursion, no confusion, acyclicity. Our constructions follow a twolevel approach—they require less work than the standard techniques which inspired them [11, 8]. Moreover, given a suitably heterogeneous notion of equality, they extend without difficulty to inductive families of datatypes. These constructions are vital components of the translation from dependently typed programs in pattern matching style [7] to the equivalent programs expressed in terms of induction principles [21] and as such play a crucial behindthescenes rôle in Epigram [25]. 1
Towards equal rights for higherkinded types
 6TH INTERNATIONAL WORKSHOP ON MULTIPARADIGM PROGRAMMING WITH LANGUAGES AT THE EUROPEAN CONFERENCE ON OBJECTORIENTED PROGRAMMING (ECOOP
, 2007
"... Generics are a very popular feature of contemporary OO languages, such as Java, C # or Scala. Their support for genericity is lacking, however. The problem is that they only support abstracting over proper types, and not over generic types. This limitation makes it impossible to, e.g., define a pre ..."
Abstract

Cited by 6 (1 self)
 Add to MetaCart
Generics are a very popular feature of contemporary OO languages, such as Java, C # or Scala. Their support for genericity is lacking, however. The problem is that they only support abstracting over proper types, and not over generic types. This limitation makes it impossible to, e.g., define a precise interface for Iterable, a core abstraction in Scala’s collection API. We implemented “type constructor polymorphism” in Scala 2.5, which solves this problem at the root, thus greatly reducing the duplication of type signatures and code.