← All repos

ppx_sexp_conv

Generation of S-expression conversion functions from type definitions

Browse cluster: OCaml incremental computation and PPX tooling
157commits
9contributors
4languages

Tech stack & purpose

ppx_sexp_conv is a PPX syntax extension for OCaml that automatically generates code to convert between OCaml types and s-expressions (a data format defined by the sexplib library). The project fits into the ppx_deriving framework, allowing developers to annotate type definitions with `[@@deriving sexp]` to automatically create serialization and deserialization functions. Beyond basic conversions, ppx_sexp_conv supports advanced features including sexp grammar generation, optional record fields, default values, polymorphic variants, exceptions, and memory-optimized stack-allocation modes. The tool covers a comprehensive range of OCaml types—from primitives and collections to records, variants, polymorphic values, and even hash tables—each with specific serialization rules.

Languages

OCaml
99.8%
Common Lisp
0.1%
Makefile
0.1%
Dune
0.0%

Contributors