Data types à la carte

  title={Data types {\`a} la carte},
  author={Wouter Swierstra},
  journal={Journal of Functional Programming},
  pages={423 - 436}
  • W. Swierstra
  • Published 18 March 2008
  • Computer Science
  • Journal of Functional Programming
Abstract This paper describes a technique for assembling both data types and functions from isolated individual components. We also explore how the same technology can be used to combine free monads and, as a result, structure Haskell's monolithic IO monad. 
A generic abstract syntax model for embedded languages
Representing a syntax tree using a data type often involves having many similar-looking constructors. Functions operating on such types often end up having many similar-looking cases. Different lan...
Trees that Grow
A programming idiom that exploits type-level functions to allow a particular form of extensibility in functional data types is described, which scales to support existentials and generalised algebraic data types.
Integration of a Decentralised Pattern Matching
A new technique for pattern matching that is based on components for each match that gives rise to a solution to the Expression Problem in presence of defaults.
Generic storage in Haskell
A framework for constructing functional data structures that can be stored on disk based on expressing datatypes as fixed points of functors and then annotating the recursive positions with additional information is presented.
Composing and decomposing data types: a closed type families implementation of data types à la carte
This work refined the subtyping constraint, which is at the centre of data types à la carte, and derived a new constraint to express type isomorphism, which allows for more flexibility in composing and decomposing data types.
Generic Programming with Combinators and Objects
A generic programming framework for OCAML which makes it possible to implement extensible transformations for a large scale of type definitions by utilising late binding to override the default behaviour of generated transformations.
Foundations of Implicit Function Types
A generalization of implicit parameters as they are currently found in Scala to implicit function types is described and formal foundations that closely follow the semantics implemented by the Scala compiler are provided.
Programación Funcional y Herencia de Clases: Tipos de Datos Algebraicos Extensibles en Scala
class Term{ def eval(): Int
Unifying Analysis Tools with Rosetta
  • N. Frisby
  • Computer Science
    2008 23rd IEEE/ACM International Conference on Automated Software Engineering
  • 2008
A semi-automated tool will generated tool-specific analysis models and a correspondence with the original Rosetta specifications, to leverage the existing analysis tools and create an analysis environment unified around the Rosetta language.
The monad zipper
This pearl demonstrates that Functional Programming’s abstractions are up to the challenge and must be followed by clever instantiation: Huet's zipper for the monad stack makes components jump through unanticipated hoops.


Generic unification via two-level types and parameterized modules
This work describes an efficient, modularized implementation of unification using the state of mutable referencecells to encode substitutions and the use of rank-2 polymorphism inside Haskell's record types to implement a form of typeparameterized modules.
Open data types and open functions
This work presents a semantically and syntactically lightweight variant of open data types and open functions as a solution to the expression problem in the Haskell language and shows that the solution is applicable to theexpression problem, generic programming, and exceptions.
Functional Programming with Bananas, Lenses, Envelopes and Barbed Wire
A calculus for lazy functional programming based on recursion operators associated with data type definitions is developed and it is shown that all example functions in Bird and Wadler's Introduction to Functional Programming can be expressed using these operators.
Beauty in the beast
This work provides a functional specification of three central components of Peyton Jones's awkward squad: teletype IO, mutable state, and concurrency, and demonstrates how these specifications may be used in tandem with QuickCheck to automatically test complex pointer algorithms and concurrent programs.
Monad transformers and modular interpreters
A fully modular interpreter based on monad transformers that incudes features missing from Steele's, Espinosa's, and Wadler's earlier efforts is designed and implemented in Gofer, whose constructor classes provide just the added power over Haskell's type classes to allow precise and convenient expression of the ideas.
Beauty in the Beast A Functional Semantics for the Awkward Squad
This work provides a functional specification of three central components of Peyton Jones’s awkward squad: teletype IO, mutable state, and concurrency, and demonstrates how these specifications may be used in tandem with QuickCheck to automatically test complex pointer algorithms and concurrent programs.
Initial Algebra Semantics Is Enough!
It has long been thought that initial algebra semantics is not expressive enough to provide a similar foundation for programming with nested types, but this paper overturns this conventional wisdom by solving all of these problems.
Foundations for structured programming with GADTs
The standard theory of data types as carriers of initial algebras of functors can be extended from algebraic and nested data types to GADTs, and a constructive demonstration that every GADT can be reduced to one which uses only the equality GADt and existential quantification is given.
Composing monads using coproducts
It is proposed that two monads should be composed by taking their coproduct, a simple idea which is general in that nearly all monads compose, mathematically elegant in using the standard categorical tools underpinning monads and computationally expressive in supporting a canonical recursion operator.
Category Theory
Category theory is a branch of abstract algebra with incredibly diverse applications. This text and reference book is aimed not only at mathematicians, but also researchers and students of computer