PPrint is an OCaml library for pretty-printing textual documents. It takes care of indentation and line breaks, and is typically used to pretty-print code.
PPrint
To install the latest released version, type opam install pprint.
opam install pprint
Here is the documentation of the latest released version.
pprint