Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Monolith.PrintSourceThe submodule Print offers facilities for printing OCaml values and expressions.
A printer transforms a value to into a document. A printer is said to be safe if it produces a document that is unambiguously delimited (e.g., delimited with parentheses). It is unsafe otherwise.
result is a result printer. It is safe.
parens encloses its argument within a pair of parentheses. It is safe. If the document thus obtained does not fit a single line, then it is split over three lines and its content is indented by two spaces.
apply doc docs constructs an OCaml application of doc to the list of arguments docs. The arguments are separated with spaces, and if the whole application does not fit on a line, then a flowing style is adopted, inserting a line break where necessary. This combinator is unsafe: the application is not parenthesized.
assert_ doc constructs an OCaml assertion, that is, an application of the variable assert to the document doc, surrounded with parentheses. This combinator is unsafe: the assertion is not parenthesized.
comment doc prints the document doc inside a comment (preceded with a breakable space). It is safe.
candidate_finds doc prints the document doc inside a comment of the form (* candidate finds _ *). See e.g. the demo demos/working/bag for an example of its use. It is safe.