• Documents
  • Authors
  • Tables
  • Other Seers ▼
    RefSeer AckSeer CollabSeer SeerSeer
  • Log in
  • Sign up
  • MetaCart

CiteSeerX logo

Advanced Search Include Citations
Advanced Search Include Citations | Disambiguate

Faking It: Simulating Dependent Types in Haskell (2001)

by Connor McBride
Add To MetaCart

Tools

Sorted by:
Results 1 - 10 of 14
Next 10 →

Generic programming within dependently typed programming

by Thorsten Altenkirch, Conor Mcbride - In Generic Programming, 2003. Proceedings of the IFIP TC2 Working Conference on Generic Programming, Schloss Dagstuhl , 2003
"... Abstract We show how higher kinded generic programming can be represented faithfully within a dependently typed programming system. This development has been implemented using the Oleg system. The present work can be seen as evidence for our thesis that extensions of type systems can be done by prog ..."
Abstract - Cited by 45 (7 self) - Add to MetaCart
Abstract We show how higher kinded generic programming can be represented faithfully within a dependently typed programming system. This development has been implemented using the Oleg system. The present work can be seen as evidence for our thesis that extensions of type systems can be done by programming within a dependently typed language, using data as codes for types. 1.

Strongly typed heterogeneous collections

by Oleg Kiselyov - 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 look-up, update, iteration, and others. There are various kinds of heterogeneous collections, differing in representation, invariants, and access operations. We describe HLIST ..."
Abstract - Cited by 41 (8 self) - Add to MetaCart
A heterogeneous collection is a datatype that is capable of storing data of different types, while providing operations for look-up, 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 type-safe 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.

Datatype-generic programming

by Jeremy Gibbons - Spring School on Datatype-Generic Programming, volume 4719 of Lecture Notes in Computer Science
"... Abstract. Generic programming aims to increase the flexibility of programming languages, by expanding the possibilities for parametrization — ideally, without also expanding the possibilities for uncaught errors. The term means different things to different people: parametric polymorphism, data abst ..."
Abstract - Cited by 34 (11 self) - Add to MetaCart
Abstract. Generic programming aims to increase the flexibility of programming languages, by expanding the possibilities for parametrization — ideally, without also expanding the possibilities for uncaught errors. The term means different things to different people: parametric polymorphism, data abstraction, meta-programming, and so on. We use it to mean polytypism, that is, parametrization by the shape of data structures rather than their contents. To avoid confusion with other uses, we have coined the qualified term datatype-generic programming for this purpose. In these lecture notes, we expand on the definition of datatype-generic programming, and present some examples of datatypegeneric programs. We also explore the connection with design patterns in object-oriented programming; in particular, we argue that certain design patterns are just higher-order datatype-generic programs. 1

Typing XHTML Web Applications in ML

by Martin Elsman, Ken Friis Larsen - In International Symposium on Practical Aspects of Declarative Languages (PADL’04), volume 3057 of LNCS , 2004
"... In this paper, we present a type system for typing Web applications in SMLserver, an e#cient multi-threaded Web server platform for Standard ML scriptlets. The type system guarantees that only conforming XHTML documents are sent to clients and that forms are used consistently and in a type-safe ..."
Abstract - Cited by 10 (0 self) - Add to MetaCart
In this paper, we present a type system for typing Web applications in SMLserver, an e#cient multi-threaded Web server platform for Standard ML scriptlets. The type system guarantees that only conforming XHTML documents are sent to clients and that forms are used consistently and in a type-safe way. The type system is encoded in the type system of Standard ML using so-called phantom types.

Why dependent types matter

by Thorsten Altenkirch, Conor Mcbride, James Mckinna - In preparation, http://www.e-pig.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.

Lightweight Invariants with Full Dependent Types

by Edwin Brady, Christoph Herrmann, Kevin Hammond
"... Dependent types allow a programmer to express invariant properties of functions, such as the relationship between the input and output lengths of a list. Several “lightweight” approaches to dependent types have been proposed for existing systems, such as Haskell’s Generalised Algebraic Data Types ..."
Abstract - Cited by 3 (2 self) - Add to MetaCart
Dependent types allow a programmer to express invariant properties of functions, such as the relationship between the input and output lengths of a list. Several “lightweight” approaches to dependent types have been proposed for existing systems, such as Haskell’s Generalised Algebraic Data Types or Type Families. Such approaches are lightweight in the sense that they require minimal modifications to existing systems. However, while these extensions are apparently simple, we find that we often run into limitations fairly quickly. In this paper we will explore these limitations, and show that a full dependent type system allows more straightforward implementation of simple invariants without restricting expressivity.

Simply Easy! An Implementation of a Dependently Typed Lambda Calculus

by Andres Löh, et al. , 2007
"... We present an implementation in Haskell of a dependently-typed lambda calculus that can be used as the core of a programming language. We show that a dependently-typed lambda calculus is no more difficult to implement than other typed lambda calculi. In fact, our implementation is almost as easy as ..."
Abstract - Cited by 2 (0 self) - Add to MetaCart
We present an implementation in Haskell of a dependently-typed lambda calculus that can be used as the core of a programming language. We show that a dependently-typed lambda calculus is no more difficult to implement than other typed lambda calculi. In fact, our implementation is almost as easy as an implementation of the simply typed lambda calculus, which we emphasize by discussing the modifications necessary to go from one to the other. We explain how to add data types and write simple programs in the core language, and discuss the steps necessary to build a full-fledged programming language on top of our simple core.

Typing XHTML Web Applications in SMLserver

by Martin Elsman, Ken Friis Larsen - Internal Project Report, CEC id. AC052/LMD/WP4/DS/S/004/b1, The Prospect Consortium , 2003
"... In this paper, we present a type system for typing Web applications in SMLserver, an e#cient multi-threaded Web server platform for Standard ML programs. The type system guarantees that only conforming XHTML documents are sent to clients and that the target scriptlets of client-submitted forms u ..."
Abstract - Cited by 1 (1 self) - Add to MetaCart
In this paper, we present a type system for typing Web applications in SMLserver, an e#cient multi-threaded Web server platform for Standard ML programs. The type system guarantees that only conforming XHTML documents are sent to clients and that the target scriptlets of client-submitted forms use form data consistently and in a type-safe way.

Phase distinctions in the compilation of Epigram

by James Mckinna, Edwin Brady , 2005
"... Abstract. It is commonly believed that in dependently typed programming languages, the blurring of the distinction between types and values means that no type erasure is possible at run-time. In this paper, however, we propose an alternative phase distinction. Rather than distinguishing types and va ..."
Abstract - Cited by 1 (1 self) - Add to MetaCart
Abstract. It is commonly believed that in dependently typed programming languages, the blurring of the distinction between types and values means that no type erasure is possible at run-time. In this paper, however, we propose an alternative phase distinction. Rather than distinguishing types and values in the compilation of EPIGRAM, we distinguish compile-time and run-time evaluation, and show by a series of program transformations that values which are not required at run-time can be erased. 1

Abstract A POPL Pearl Submission Clowns to the Left of me, Jokers to the Right

by Joe Egan, Gerry Rafferty
"... This paper, submitted as a ‘pearl’, introduces a small but useful generalisation to the ‘derivative ’ operation on datatypes underlying Huet’s notion of ‘zipper ’ (Huet 1997; McBride 2001; Abbott et al. 2005b), giving a concrete representation to one-hole contexts in data which is in mid-transformat ..."
Abstract - Add to MetaCart
This paper, submitted as a ‘pearl’, introduces a small but useful generalisation to the ‘derivative ’ operation on datatypes underlying Huet’s notion of ‘zipper ’ (Huet 1997; McBride 2001; Abbott et al. 2005b), giving a concrete representation to one-hole contexts in data which is in mid-transformation. This operator, ‘dissection’, turns a container-like functor into a bifunctor representing a onehole context in which elements to the left of the hole are distinguished in type from elements to its right. I present dissection for polynomial functors, although it is certainly more general, preferring to concentrate here on its diverse applications. For a start, map-like operations over the functor and fold-like operations over the recursive data structure it induces can be expressed by tail recursion alone. Moreover, the derivative is readily recovered from the dissection, along with Huet’s navigation operations. A further special case of dissection, ‘division’, captures the notion of leftmost hole, canonically distinguishing values with no elements from those with at least one. By way of a more practical example, division and dissection are exploited to give a relatively efficient generic algorithm for abstracting all occurrences of one term from another in a first-order syntax. The source code for the paper is available online 1 and compiles with recent extensions to the Glasgow Haskell Compiler. 1.
The National Science Foundation
  • About CiteSeerX
  • Submit Documents
  • Privacy Policy
  • Help
  • Data
  • Source
  • Contact Us

Developed at and hosted by The College of Information Sciences and Technology

© 2007-2010 The Pennsylvania State University