Module Acutis_internals.Pp

Helpers for Format functions.

val comma : Stdlib.Format.formatter -> unit -> unit

Prints ,@ .

val syntax_string : Stdlib.Format.formatter -> string -> unit

Equivalent to the format string "%S".

val at : (Stdlib.Format.formatter -> 'a -> unit) -> Stdlib.Format.formatter -> 'a -> unit

at pp ppf a prints @a.

val ellipsis : Stdlib.Format.formatter -> unit -> unit

Prints ...

val field : Stdlib.Format.formatter -> string -> unit

Prints either field or "string field" depending on whether the input is a valid identifier.

val bool : Stdlib.Format.formatter -> int -> unit

Prints false if the input is 0, or prints true otherwise.

val surround : char -> char -> (Stdlib.Format.formatter -> 'a -> unit) -> Stdlib.Format.formatter -> 'a -> unit

surround left right f ppf x prints x with left and right printed before and after it, e.g. {x}.

val equation : (Stdlib.Format.formatter -> 'key -> unit) -> string -> (Stdlib.Format.formatter -> 'value -> unit) -> Stdlib.Format.formatter -> ('key * 'value) -> unit

equation pp_k sep pp_v ppf (k, v) prints k sep v, e.g. a = 1.

module Ty_repr : sig ... end

Pretty-print typed representations of OCaml values.