|
ABSTRACT
We describe deriving, a system of extensible generic functions for OCaml implemented as a preprocessor and supporting library. We argue that generating code from type-definitions has significant advantages over a combinator approach, taking serialisation as an example application: our generate-your-boilerplate design results in a system that is easy to use, has comprehensive coverage of types and handles cyclic values without imposing a burden on the user. Users can extend generic functions with specialised implementations at particular types; we show how this can lead to dramatically improved performance in the serialisation task without the user writing a single line of serialisation code.
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
|
John Billings , Peter Sewell , Mark Shinwell , Rok Strniša, Type-safe distributed programming for OCaml, Proceedings of the 2006 workshop on ML, September 16-16, 2006, Portland, Oregon, USA
[doi> 10.1145/1159876.1159881]
|
| |
2
|
Jacques Carette, Lydia E. van Dijk and Oleg Kiselyov. Syntactic extension for Monads in Ocaml. http://www.cas.mcmaster.ca/~carette/pa_monad/.
|
 |
3
|
|
| |
4
|
Albert Cohen and C. Herrmann. Towards a High-Productivity and High-Performance Marshaling Library for Compound Data. 2nd MetaOCaml Workshop, 2005.
|
| |
5
|
Ezra Cooper, Sam Lindley, Philip Wadler, and Jeremy Yallop. Links: Web Programming Without Tiers. FMCO, 2006.
|
 |
6
|
|
| |
7
|
Martin Elsman. Type-Specialized Serialization with Sharing. Trends in Functional Programming, 2005.
|
| |
8
|
Andrzej Filinski. Controlling Effects. PhD Thesis, School of Computer Science, Carnegie Mellon University, May 1996.
|
| |
9
|
Jacques Garrigue. Programming with Polymorphic Variants. ML Workshop, 1998.
|
 |
10
|
|
| |
11
|
Ralf Hinze, Johan Jeuring, and Andres Löh. Comparing approaches to generic programming in Haskell. Spring School on Datatype-Generic Programming, 2006.
|
 |
12
|
|
| |
13
|
Ralf Hinze, Andres Löh, and Bruno C. d. S. Oliveira. "Scrap Your Boilerplate" Reloaded FLOPS, 2006.
|
| |
14
|
|
| |
15
|
Martin Jambon. json-static. http://martin.jambon.free.fr/json-static.html.
|
| |
16
|
Martin Jambon. pa tryfinally. http://martin.jambon.free.fr/pa_tryfinally.ml.
|
 |
17
|
|
 |
18
|
|
| |
19
|
H. Abelson , R. K. Dybvig , C. T. Haynes , G. J. Rozas , N. I. Adams Iv , D. P. Friedman , E. Kohlbecker , G. L. Steele, Jr. , D. H. Bartley , R. Halstead , D. Oxley , G. J. Sussman , G. Brooks , C. Hanson , K. M. Pitman , M. Wand, Revised Report on the Algorithmic Language Scheme, Higher-Order and Symbolic Computation, v.11 n.1, p.7-105, August 1998
[doi> 10.1023/A:1010051815785]
|
| |
20
|
|
| |
21
|
Oleg Kiselyov. Post to Haskell list, August 2004. http://haskell.org/pipermail/haskell/2004-August/014463.html
|
| |
22
|
Ralf Lämmel and Simon Peyton-Jones. Scrap your boilerplate: a practical design pattern for generic programming. TLDI, 2003.
|
| |
23
|
|
| |
24
|
Neil Mitchell and Stefan O'Rear. Derive. http://www-users.cs.york.ac.uk/~ndm/derive/.
|
| |
25
|
Simon Peyton Jones and John Hughes (editors). Haskell 98: A Non-strict, Purely Functional Language. February, 1999.
|
| |
26
|
Daniel de Rauglaudre. IoXML. http://cristal.inria.fr/~ddr/IoXML/.
|
| |
27
|
Martin Sandin. Tywith. http://tools.assembla.com/tywith/wiki.
|
| |
28
|
Guido Tack, Leif Kornstaedt and Gert Smolka. Generic Pickling and Minimization. ML Workshop, 2005.
|
 |
29
|
|
| |
30
|
Stefan Wehr. ML Modules and Haskell Type Classes: A Constructive Comparison. Master's thesis, Albert-Ludwigs-Universität, Freiburg, Germany, November 2005.
|
 |
31
|
|
| |
32
|
Noel Winstanley. DrIFT. http://repetae.net/~john/computer/haskell/DrIFT/.
|
| |
33
|
Programming languages - C. ISO/IEC 9899:1999.
|
| |
34
|
American National Standard for Programming Language Common LISP. ANSI X3.226:1994. J13/SC22/WG16 Common LISP
|
|