Deforestation: transforming programs to eliminate trees
Proceedings of the Second European Symposium on Programming
Programming in Martin-Lo¨f's type theory: an introduction
Programming in Martin-Lo¨f's type theory: an introduction
Functional programming with bananas, lenses, envelopes and barbed wire
Proceedings of the 5th ACM conference on Functional programming languages and computer architecture
Design patterns: elements of reusable object-oriented software
Design patterns: elements of reusable object-oriented software
Modern compiler implementation in ML: basic techniques
Modern compiler implementation in ML: basic techniques
PolyP—a polytypic programming language extension
Proceedings of the 24th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Making the future safe for the past: adding genericity to the Java programming language
Proceedings of the 13th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications
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
POPL '83 Proceedings of the 10th ACM SIGACT-SIGPLAN symposium on Principles of programming languages
Template meta-programming for Haskell
Proceedings of the 2002 ACM SIGPLAN workshop on Haskell
Modern Compiler Implementation in Java
Modern Compiler Implementation in Java
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
Two-level types and parameterized modules
Journal of Functional Programming
Proceedings of the ninth ACM SIGPLAN international conference on Functional programming
Java(TM) Language Specification, The (3rd Edition) (Java (Addison-Wesley))
Java(TM) Language Specification, The (3rd Edition) (Java (Addison-Wesley))
EDUCATIONAL PEARL: A Nanopass framework for compiler education
Journal of Functional Programming
Simple unification-based type inference for GADTs
Proceedings of the eleventh ACM SIGPLAN international conference on Functional programming
Practical type inference for arbitrary-rank types
Journal of Functional Programming
Applicative programming with effects
Journal of Functional Programming
SSDGP'06 Proceedings of the 2006 international conference on Datatype-generic programming
“Scrap your boilerplate” reloaded
FLOPS'06 Proceedings of the 8th international conference on Functional and Logic Programming
The Essence of the Iterator Pattern
MSFP'06 Proceedings of the 2006 international conference on Mathematically Structured Functional Programming
Alloy: fast generic transformations for Haskell
Proceedings of the 2nd ACM SIGPLAN symposium on Haskell
EACL '09 Proceedings of the 12th Conference of the European Chapter of the Association for Computational Linguistics: Demonstrations Session
Translating between language and logic: what is easy and what is difficult
CADE'11 Proceedings of the 23rd international conference on Automated deduction
A pattern for almost homomorphic functions
Proceedings of the 8th ACM SIGPLAN workshop on Generic 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 all of the constructors in the type(s), except a limited number of them, 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 are given, 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. The relationships to the “Scrap Your Boilerplate” approach to generic programming, and to general tree types in dependent type theory, are investigated by reimplementing our operations using those frameworks.