Generic Programming in OCaml

Florent Balestrieri, Michel Mauny
12/31/2018
cs.PL

Official code: balez/generic (34 stars, OCaml, LGPL-2.1, last commit 2017-03-29).

Abstract

We present a library for generic programming in OCaml, adapting some techniques borrowed from other functional languages. The library makes use of three recent additions to OCaml: generalised abstract datatypes are essential to reflect types, extensible variants allow this reflection to be open for new additions, and extension points provide syntactic sugar and generate boiler plate code that simplify the use of the library.

Show full abstract

The building blocks of the library can be used to support many approaches to generic programming through the concept of view. Generic traversals are implemented on top of the library and provide powerful combinators to write concise definitions of recursive functions over complex tree types. Our case study is a type-safe deserialisation function that respects type abstraction.

View on arXivView PDF

Code Implementations(1)

balez/genericOfficial100%
LGPL-2.1

Generic Programming Library for OCaml

344OCaml, CSSJan 10, 20179 years agoLGPL-2.1

Similar Papers

Cite this paper

@article{balestrieri2018generic,
  title  = {Generic Programming in OCaml},
  author = {Florent Balestrieri and Michel Mauny},
  year   = {2018},
  eprint = {1812.11665},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1812.11665}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/1812.11665.svg)](https://codeofpaper.com/paper/1812.11665)

Discussion