Base library and tools for ppx rewriters
Browse cluster: OCaml Systems and Utilities →ppxlib is a base library and tooling for PPX rewriters in OCaml. The material primarily documents ppx_sexp_conv, a PPX syntax extension built with ppxlib that generates code for converting OCaml types to and from s-expressions—a serialization format consisting of atoms and nested lists—as used by the sexplib library. The extension integrates with the ppx_deriving framework and supports conversion rules for basic types, collections, tuples, records, variants, polymorphic types, and other OCaml constructs, with extensive customization via attributes. The repository also includes developer utilities like gencopy, a code generation tool for creating migration functions when adding support for new OCaml compiler versions.