Results 1  10
of
54
Dependencystyle Generic Haskell
, 2003
"... Generic Haskell is an extension of Haskell that supports the construction of generic programs. During the development of several applications, such as an XML editor and compressor, we encountered a number of limitations with the existing (Classic) Generic Haskell language, as implemented by the c ..."
Abstract

Cited by 68 (22 self)
 Add to MetaCart
Generic Haskell is an extension of Haskell that supports the construction of generic programs. During the development of several applications, such as an XML editor and compressor, we encountered a number of limitations with the existing (Classic) Generic Haskell language, as implemented by the current Generic Haskell compiler. Specifically,
Generic Haskell: practice and theory
 In Generic Programming, Advanced Lectures, volume 2793 of LNCS
, 2003
"... Abstract. Generic Haskell is an extension of Haskell that supports the construction of generic programs. These lecture notes describe the basic constructs of Generic Haskell and highlight the underlying theory. Generic programming aims at making programming more effective by making it more general. ..."
Abstract

Cited by 65 (23 self)
 Add to MetaCart
Abstract. Generic Haskell is an extension of Haskell that supports the construction of generic programs. These lecture notes describe the basic constructs of Generic Haskell and highlight the underlying theory. Generic programming aims at making programming more effective by making it more general. Generic programs often embody nontraditional kinds of polymorphism. Generic Haskell is an extension of Haskell [38] that supports the construction of generic programs. Generic Haskell adds to Haskell the notion of structural polymorphism, the ability to define a function (or a type) by induction on the structure of types. Such a function is generic in the sense that it works not only for a specific type but for a whole class of types. Typical examples include equality, parsing and pretty printing, serialising, ordering, hashing, and so on. The lecture notes on Generic Haskell are organized into two parts. This first part motivates the need for genericity, describes the basic constructs of Generic Haskell, puts Generic Haskell into perspective, and highlights the underlying theory. The second part entitled “Generic Haskell: applications ” delves deeper into the language discussing three nontrivial applications of Generic Haskell: generic dictionaries, compressing XML documents, and a generic version of the zipper data type. The first part is organized as follows. Section 1 provides some background discussing type systems in general and the type system of Haskell in particular. Furthermore, it motivates the basic constructs of Generic Haskell. Section 2 takes a closer look at generic definitions and shows how to define some popular generic functions. Section 3 highlights the theory underlying Generic Haskell and discusses its implementation. Section 4 concludes. 1
Scrap More Boilerplate: Reflection, Zips, and Generalised Casts
, 2004
"... Writing boilerplate code is a royal pain. Generic programming promises to alleviate this pain by allowing the programmer to write a generic "recipe" for boilerplate code, and use that recipe in many places. In earlier work we introduced the "Scrap your boilerplate " approach to g ..."
Abstract

Cited by 61 (4 self)
 Add to MetaCart
Writing boilerplate code is a royal pain. Generic programming promises to alleviate this pain by allowing the programmer to write a generic "recipe" for boilerplate code, and use that recipe in many places. In earlier work we introduced the "Scrap your boilerplate " approach to generic programming, which cunningly exploits Haskell's existing typeclass mechanism to support generic transformations and queries.
Indexed InductionRecursion
, 2001
"... We give two nite axiomatizations of indexed inductiverecursive de nitions in intuitionistic type theory. They extend our previous nite axiomatizations of inductiverecursive de nitions of sets to indexed families of sets and encompass virtually all de nitions of sets which have been used in ..."
Abstract

Cited by 43 (15 self)
 Add to MetaCart
We give two nite axiomatizations of indexed inductiverecursive de nitions in intuitionistic type theory. They extend our previous nite axiomatizations of inductiverecursive de nitions of sets to indexed families of sets and encompass virtually all de nitions of sets which have been used in intuitionistic type theory. The more restricted of the two axiomatization arises naturally by considering indexed inductiverecursive de nitions as initial algebras in slice categories, whereas the other admits a more general and convenient form of an introduction rule.
Universes for Generic Programs and Proofs in Dependent Type Theory
 Nordic Journal of Computing
, 2003
"... We show how to write generic programs and proofs in MartinL of type theory. To this end we consider several extensions of MartinL of's logical framework for dependent types. Each extension has a universes of codes (signatures) for inductively defined sets with generic formation, introductio ..."
Abstract

Cited by 42 (2 self)
 Add to MetaCart
We show how to write generic programs and proofs in MartinL of type theory. To this end we consider several extensions of MartinL of's logical framework for dependent types. Each extension has a universes of codes (signatures) for inductively defined sets with generic formation, introduction, elimination, and equality rules. These extensions are modeled on Dybjer and Setzer's finitely axiomatized theories of inductiverecursive definitions, which also have a universe of codes for sets, and generic formation, introduction, elimination, and equality rules.
Categories of Containers
 In Proceedings of Foundations of Software Science and Computation Structures
, 2003
"... Abstract. We introduce the notion of containers as a mathematical formalisation of the idea that many important datatypes consist of templates where data is stored. We show that containers have good closure properties under a variety of constructions including the formation of initial algebras and f ..."
Abstract

Cited by 40 (7 self)
 Add to MetaCart
Abstract. We introduce the notion of containers as a mathematical formalisation of the idea that many important datatypes consist of templates where data is stored. We show that containers have good closure properties under a variety of constructions including the formation of initial algebras and final coalgebras. We also show that containers include strictly positive types and shapely types but that there are containers which do not correspond to either of these. Further, we derive a representation result classifying the nature of polymorphic functions between containers. We finish this paper with an application to the theory of shapely types and refer to a forthcoming paper which applies this theory to differentiable types. 1
Generic views on data types
 In Tarmo Uustalu, editor, Proceedings 8th International Conference on Mathematics of Program Construction, MPC’06, volume 4014 of LNCS
, 2006
"... Abstract. A generic function is defined by induction on the structure of types. The structure of a data type can be defined in several ways. For example, in PolyP a pattern functor gives the structure of a data type viewed as a fixed point, and in Generic Haskell a structural representation type giv ..."
Abstract

Cited by 25 (9 self)
 Add to MetaCart
Abstract. A generic function is defined by induction on the structure of types. The structure of a data type can be defined in several ways. For example, in PolyP a pattern functor gives the structure of a data type viewed as a fixed point, and in Generic Haskell a structural representation type gives an isomorphic type view of a data type in terms of sums of products. Depending on this generic view on the structure of data types, some generic functions are easier, more difficult, or even impossible to define. Furthermore, the efficiency of some generic functions can be improved by choosing a different view. This paper introduces generic views on data types and shows why they are useful. Furthermore, it shows how generic views have been added to Generic Haskell, an extension of the functional programming language Haskell that supports the construction of generic functions. The separation between inductive definitions on type structure and generic views allows us to combine many approaches to generic programming in a single framework. 1
Ur: StaticallyTyped Metaprogramming with TypeLevel Record Computation
, 2010
"... Dependent types provide a strong foundation for specifying and verifying rich properties of programs through typechecking. The earliest implementations combined dependency, which allows types to mention program variables; with typelevel computation, which facilitates expressive specifications that ..."
Abstract

Cited by 23 (1 self)
 Add to MetaCart
Dependent types provide a strong foundation for specifying and verifying rich properties of programs through typechecking. The earliest implementations combined dependency, which allows types to mention program variables; with typelevel computation, which facilitates expressive specifications that compute with recursive functions over types. While many recent applications of dependent types omit the latter facility, we argue in this paper that it deserves more attention, even when implemented without dependency. In particular, the ability to use functional programs as specifications enables staticallytyped metaprogramming: programs write programs, and static typechecking guarantees that the generating process never produces invalid code. Since our focus is on generic validity properties rather than full correctness verification, it is possible to engineer type inference systems that are very effective in narrow domains. As a demonstration, we present Ur, a programming language designed to facilitate metaprogramming with firstclass records and names. On top of Ur, we implement Ur/Web, a special standard library that enables the development of modern Web applications. Adhoc code generation is already in wide use in the popular Web application frameworks, and we show how that generation may be tamed using types, without forcing metaprogram authors to write proofs or forcing metaprogram users to write any fancy types.
The Gentle Art of Levitation
"... We present a closed dependent type theory whose inductive types are given not by a scheme for generative declarations, but by encoding in a universe. Each inductive datatype arises by interpreting its description—a firstclass value in a datatype of descriptions. Moreover, the latter itself has a de ..."
Abstract

Cited by 21 (4 self)
 Add to MetaCart
We present a closed dependent type theory whose inductive types are given not by a scheme for generative declarations, but by encoding in a universe. Each inductive datatype arises by interpreting its description—a firstclass value in a datatype of descriptions. Moreover, the latter itself has a description. Datatypegeneric programming thus becomes ordinary programming. We show some of the resulting generic operations and deploy them in particular, useful ways on the datatype of datatype descriptions itself. Surprisingly this apparently selfsupporting setup is achievable without paradox or infinite regress. 1.