Message#
Ltac2.Message
val print : message -> unitprint msg writes the message on the output stream.
val empty : messageempty is the empty message.
val of_string : string -> messageof_string s prints a string.
val to_string : message -> stringto_string s converts a message to a string.
val of_int : int -> messageof_int n prints an integer.
val of_constr : Environ.env -> Evd.evar_map -> constr -> messageof_constr env sigma t prints t at level 8 (surrounding with parentheses to print syntax above that level such as applications).
val of_lconstr : Environ.env -> Evd.evar_map -> constr -> messageof_lconstr env sigma t prints t at level 200 (no surrounding parentheses).
val of_preterm : Environ.env -> Evd.evar_map -> preterm -> messageof_preterm env sigma t prints t at level 8 (surrounding with parentheses to print syntax above that level such as applications).
val of_lpreterm : Environ.env -> Evd.evar_map -> preterm -> messageof_lpreterm env sigma t prints t at level 200 (no surrounding parentheses).
of_exninfo exninfo prints the (Ltac2 and OCaml) backtrace info if it was recorded.
Boxing primitives#
They are translated to OCaml "Format" boxes, see https://ocaml.org/docs/formatting-text.
val force_new_line : messageforce_new_line forces writing on a new line after this.
Warning: partially reinitializes the pretty-printing engine, potentially leading to bad printing afterwards. Prefer using a break hint inside a vertical box.
val break : int -> int -> messageGeneral break hint: break n i either prints n spaces or splits the line adding i to the current indentation.
val space : messageBreaking space. Equivalent to break 1 0.
Horizontal box. Break hints in a horizontal box never split the line (nested boxes inside the horizontal box may allow line splitting).
Vertical box. Every break hint in a vertical box splits the line. The int is added to the current indentation when splitting the line.
Horizontal/vertical box. Behaves as a horizontal box if it fits on a single line, otherwise behaves as a vertical box (using the given int).