Module Pp
Coq document type.
type pp_tag= stringtype ttype block_type=|Pp_hbox of int|Pp_vbox of int|Pp_hvbox of int|Pp_hovbox of inttype doc_view=|Ppcmd_empty|Ppcmd_string of string|Ppcmd_glue of t list|Ppcmd_box of block_type * t|Ppcmd_tag of pp_tag * t|Ppcmd_print_break of int * int|Ppcmd_force_newline|Ppcmd_comment of string list
Formatting commands
Manipulation commands
Derived commands
Boxing commands
Tagging
Printing combinators
val pr_comma : unit -> tWell-spaced comma.
val pr_semicolon : unit -> tWell-spaced semicolon.
val pr_bar : unit -> tWell-spaced pipe bar.
val pr_spcbar : unit -> tPipe bar with space before and after.
val pr_opt : ('a -> t) -> 'a option -> tInner object preceded with a space if
Some, nothing otherwise.
val pr_nth : int -> tOrdinal number with the correct suffix (i.e. "st", "nd", "th", etc.).
val prlist : ('a -> t) -> 'a list -> tConcatenation of the list contents, without any separator.
Unlike all other functions below,
prlistworks lazily. If a strict behavior is needed, useprlist_strictinstead.
val prlist_with_sep : (unit -> t) -> ('a -> t) -> 'a list -> tprlist_with_sep sep pr [a ; ... ; c]outputspr a ++ sep () ++ ... ++ sep () ++ pr c. where the thunk sep is memoized, rather than being called each place its result is used.
val prvecti_with_sep : (unit -> t) -> (int -> 'a -> t) -> 'a array -> tIndexed version of
prvect_with_sep.
val pr_enum : ('a -> t) -> 'a list -> tpr_enum pr [a ; b ; ... ; c]outputspr a ++ str "," ++ pr b ++ str "," ++ ... ++ str "and" ++ pr c.
Main renderers, to formatter and to string
val pp_with : Stdlib.Format.formatter -> t -> unitpp_with fmt ppPrintpptofmtand don't flushfmt
val string_of_ppcmds : t -> stringval start_pfx : stringTag prefix to start a multi-token diff span
val db_print_pp : Stdlib.Format.formatter -> t -> unitPrint the Pp in tree form for debugging
val db_string_of_pp : t -> stringPrint the Pp in tree form for debugging, return as a string