Design patterns: elements of reusable object-oriented software
Design patterns: elements of reusable object-oriented software
PolyP—a polytypic programming language extension
Proceedings of the 24th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Modern compiler implementation in Java
Modern compiler implementation in Java
Modern C++ design: generic programming and design patterns applied
Modern C++ design: generic programming and design patterns applied
The boost graph library: user guide and reference manual
The boost graph library: user guide and reference manual
Visitor combination and traversal control
OOPSLA '01 Proceedings of the 16th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications
Modern Compiler Implementation: In ML
Modern Compiler Implementation: In ML
Template meta-programming for Haskell
Proceedings of the 2002 ACM SIGPLAN workshop on Haskell
Scrap your boilerplate: a practical design pattern for generic programming
Proceedings of the 2003 ACM SIGPLAN international workshop on Types in languages design and implementation
Functional Programming with Overloading and Higher-Order Polymorphism
Advanced Functional Programming, First International Spring School on Advanced Functional Programming Techniques-Tutorial Text
A Set Constructor for Inductive Sets in Martin-Löf's Type Theory
Category Theory and Computer Science
Journal of Functional Programming
Proceedings of the ninth ACM SIGPLAN international conference on Functional programming
Simple unification-based type inference for GADTs
Proceedings of the eleventh ACM SIGPLAN international conference on Functional programming
Applicative programming with effects
Journal of Functional Programming
“Scrap your boilerplate” reloaded
FLOPS'06 Proceedings of the 8th international conference on Functional and Logic Programming
Uniform boilerplate and list processing
Haskell '07 Proceedings of the ACM SIGPLAN workshop on Haskell workshop
Comparing libraries for generic programming in haskell
Proceedings of the first ACM SIGPLAN symposium on Haskell
A lightweight approach to datatype-generic rewriting
Proceedings of the ACM SIGPLAN workshop on Generic programming
Generic programming with fixed points for mutually recursive datatypes
Proceedings of the 14th ACM SIGPLAN international conference on Functional programming
A lightweight approach to datatype-generic rewriting
Journal of Functional Programming
Hi-index | 0.00 |
This paper introduces a pattern for almost compositional functions over recursive data types, and over families of mutually recursive data types. Here "almost compositional" means that for a number of the constructors in the type(s), the result of the function depends only on the constructor and the results of calling the function on the constructor's arguments. The pattern consists of a generic part constructed once for each data type or family of data types, and a task-specific part. The generic part contains the code for the predictable compositional cases, leaving the interesting work to the task-specific part. Examples of the pattern implemented in dependent type theory with inductive families, in Haskell with generalized algebraic data types and rank-2 polymorphism, and in Java using a variant of the Visitor design pattern are given. The relationship to the "Scrap Your Boilerplate" approach to generic programming, and to general tree types in dependent type theory are also investigated.