This library provides an alternative to the Format
module of the OCaml standard library. Pp uses the same concepts of boxes and break hints, and the final rendering is done to formatter from the Format
module. However it defines its own algebra which some might find easier to work with and reason about.
This library provides a lean alternative to the Format [1] module of the OCaml standard library. It aims to make it easy for users to do the right thing. If you have tried Format before but find its API complicated and difficult to use, then Pp might be a good choice for you.
Pp uses the same concepts of boxes and break hints, and the final rendering is done to formatter from the Format module. However it defines its own algebra which some might find easier to work with and reason about. No previous knowledge is required to start using this library, however the various guides for the Format module such as this one [2] should be applicable to Pp as well.
[1]: https://caml.inria.fr/pub/docs/manual-ocaml/libref/Format.html [2]: http://caml.inria.fr/resources/doc/guides/format.en.html
This OCaml library offers a set of combinators for building so-called documents as well as an efficient engine for converting documents to a textual, fixed-width format. The engine takes care of indentation and line breaks, while respecting the constraints imposed by the structure of the document and by the text width.
A comprehensive toolbox for ppx development. It features:
an OCaml AST / parser / pretty-printer snapshot, to create a full frontend independent of the version of OCaml;
a library for library for ppx rewriters in general, and type-driven code generators in particular;
a feature-full driver for OCaml AST transformers;
a quotation mechanism allowing to write values representing the OCaml AST in the OCaml syntax;
a generator of open recursion classes from type definitions.
This package provides ppx_sexp_message-like extension nodes for lazily rendering log messages.
A ppx rewriter for monadic and applicative let bindings, match expressions, and if expressions.
ppx_bap
is the set of blessed ppx rewriters used in BAP projects. It fills the same role as ppx_base
or ppx_jane
(from which it is derived), but doesn't impose any style requirements and has only the minimal necessary set of rewriters.
Syntax extension that makes [failwiths] always include a position.
Part of the Jane Street's PPX rewriters collection.
This package is a collection of ppx rewriters that generate hash functions from type exrpessions and definitions.
This package installs a ppx-jane executable, which is a ppx driver including all standard Jane Street ppx rewriters.
Ppx_base is the set of ppx rewriters used for Base.
Note that Base doesn't need ppx to build, it is only used as a verification tool.
This package contains an syntax extension to indicate that the code is on the cold path and should be kept out of the way to avoid polluting the instruction cache on the hot path. See also https://github.com/ocaml/ocaml/issues/8563.
Syntax extension for writing in-line benchmarks in ocaml code.
Ppx_tools provides tools for authors of ppx rewriters and other syntactic tools.
This extension provides a syntax for string interpolation.
Ppx-import is a syntax extension for importing declarations from interface files.
This package contains assert-like extension nodes that raise useful errors on failure.
This package is a ppx extension for easier implementation of conversion functions between almost identical types.
Expect-test is a framework for writing tests in OCaml, similar to Cram. Expect-tests mimics the existing inline tests framework with the let%expect_test
construct. The body of an expect-test can contain output-generating code, interleaved with %expect
extension expressions to denote the expected output.
Ppx_optcomp stands for Optional Compilation. It is a tool used to handle optional compilations of pieces of code depending of the word size, the version of the compiler, ...
Cstruct is a library and syntax extension to make it easier to access C-like structures directly from OCaml. It supports both reading and writing to these structures, and they are accessed via the Bigarray module.
Generation of fast comparison functions from type expressions and definitions. Ppx_compare is a ppx rewriter that derives comparison functions from type representations. The scaffolded functions are usually much faster than ocaml's Pervasives.compare. Scaffolding functions also gives you more flexibility by allowing you to override them for a specific type and more safety by making sure that you only compare comparable values.
Generation of binary serialization and deserialization functions from type definitions.