|
ABSTRACT
Generic traversals over recursive data structures are often referred to as boilerplate code. The definitions of functions involving such traversals may repeat very similar patterns, but with variations for different data types and different functionality. Libraries of operations abstracting away boilerplate code typically rely on elaborate types to make operations generic. The motivating observation for this paper is that most traversals have value-specific behaviour for just one type. We present the design of a new library exploiting this assumption. Our library allows concise expression of traversals with competitive performance.
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
 |
1
|
|
 |
2
|
|
| |
3
|
Dimitry Golubovsky, Neil Mitchell, and Matthew Naylor. Yhc.Core - from Haskell to Core. The Monad.Reader, (7):45--61, April 2007.
|
 |
4
|
|
| |
5
|
Ralf Hinze and Johan Jeuring. Generic Haskell: Practice and theory. In Summer School on Generic Programming, volume 2793 of LNCS, pages 1--56. Springer-Verlang, 2003.
|
| |
6
|
|
| |
7
|
|
| |
8
|
Ralf Lämmel. The sketch of a polymorphic symphony. In Proc. of International Workshop on Reduction Strategies in Rewriting and Programming(WRS 2002), volume 70 of ENTCS. Elsevier Science, 2002.
|
| |
9
|
Ralf Lämmel. Typed generic traversal with term rewriting strategies. Journal of Logic and Algebraic Programming, 54:1--64, 2003.
|
 |
10
|
|
 |
11
|
Ralf Lämmel , Simon Peyton Jones, Scrap more boilerplate: reflection, zips, and generalised casts, Proceedings of the ninth ACM SIGPLAN international conference on Functional programming, September 19-21, 2004, Snow Bird, UT, USA
|
 |
12
|
|
| |
13
|
|
| |
14
|
Lambert G. L. T. Meertens. Paramorphisms. Formal Aspects of Computing, 4(5):413--424, 1992.
|
| |
15
|
Neil Mitchell and Stefan O'Rear. Derive - project home page. http://www.cs.york.ac.uk/~ndm/derive/, March 2007.
|
| |
16
|
Neil Mitchell and Colin Runciman. A static checker for safe pattern matching in Haskell. In Trends in Functional Programming (2005 Symposium), volume 6, pages 15--30. Intellect, 2007.
|
| |
17
|
|
| |
18
|
|
| |
19
|
Simon Peyton-Jones, Andrew Tolmach, and Tony Hoare. Playing by the rules: Rewriting as a practical optimisation technique in GHC. In Proc. Haskell '01, pages 203--233. ACM Press, 2001.
|
 |
20
|
Simon Peyton Jones , Dimitrios Vytiniotis , Stephanie Weirich , Geoffrey Washburn, Simple unification-based type inference for GADTs, Proceedings of the eleventh ACM SIGPLAN international conference on Functional programming, September 16-21, 2006, Portland, Oregon, USA
|
 |
21
|
|
 |
22
|
|
| |
23
|
Eelco Visser. Program transformation with Stratego/XT: Rules, strategies, tools, and systems in StrategoXT-0.9. In Domain-Specific Program Generation, volume 3016 of LNCS, pages 216--238. Spinger-Verlag, June 2004.
|
| |
24
|
Philip Wadler. List comprehensions. In Simon Peyton Jones, editor, Implementation of Functional Programming Languages. Prentice Hall, 1987.
|
 |
25
|
|
| |
26
|
Noel Winstanley. Reflections on instance derivation. In 1997 Glasgow Workshop on Functional Programming. BCS Workshops in Computer Science, September 1997.
|
CITED BY 2
|
|
Alexey Rodriguez , Johan Jeuring , Patrik Jansson , Alex Gerdes , Oleg Kiselyov , Bruno C. d. S. Oliveira, Comparing libraries for generic programming in haskell, Proceedings of the first ACM SIGPLAN symposium on Haskell, September 25-25, 2008, Victoria, BC, Canada
|
|
|
Thomas van Noort , Alexey Rodriguez , Stefan Holdermans , Johan Jeuring , Bastiaan Heeren, A lightweight approach to datatype-generic rewriting, Proceedings of the ACM SIGPLAN workshop on Generic programming, September 20-20, 2008, Victoria, BC, Canada
|
|