Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
val empty : t
The printer which prints nothing.
val substring : string -> int -> int -> t
substring s pos len
: pretty printer printing a substring of s
starting at pos
and having length len
.
val string : string -> t
string s
: pretty printer printing the string s
.
val char : char -> t
char s
: pretty printer printing the character c
.
val fill : int -> char -> t
fill n c
: pretty printer printing the character c
n
times.
val line : string -> t
text s
: pretty printer printing an optional line break with the alternative text s
.
val cut : t
pretty printer printing an optional line break with no alternative text.
val space : t
pretty printer printing an optional line break with a blank as alternative text.
nest i pp
: pretty printer printing the same content as pp
but doing an additional indent of i
at each line break.
nest i pp
: pretty printer printing the same content as pp
but doing an additional indent of i
relative to the current position at each line break.
group pp
: treat all line breaks appearing in pp
consistently i.e. either output all as line breaks or all with their alternative text.
val wrap_words : string -> t
wrap_words s
: Print the string s
with all the words in it potentially wrapped.
val fill_paragraph : string -> t
fill_paragraph s
: Print the string s
as a paragraph i.e. putting as many words on a line as possible.