package jhupllib

  1. Overview
  2. Docs

Module Jhupllib_pp_utilsSource

Sourcetype 'a pretty_printer = Batteries.Format.formatter -> 'a -> unit
Sourceval pp_concat_sep : string -> 'a pretty_printer -> 'a Batteries.Enum.t pretty_printer

A function to pretty-print an enumeration of items. This enumeration is boxed and the delimiter is interleaved between each item. The arguments are:

  • The separator string.
  • The pretty-printing function for the items.
  • The formatter to use.
  • The item enumeration.
Sourceval pp_concat_sep_delim : string -> string -> string -> 'a pretty_printer -> 'a Batteries.Enum.t pretty_printer

A function to pretty-print an enumeration of items bracketed by specific start and stop symbols. The arguments are:

  • The start symbol.
  • The end symbol.
  • The separator string.
  • The pretty-printing function for the items.
  • The formatter to use.
  • The item enumeration.
Sourceval pp_tuple : 'a pretty_printer -> 'b pretty_printer -> ('a * 'b) pretty_printer

Pretty-prints a tuple. The arguments are:

  • A pretty-printing function for the first element.
  • A pretty-printing function for the second element.
  • The formatter.
  • The tuple.
Sourceval pp_triple : 'a pretty_printer -> 'b pretty_printer -> 'c pretty_printer -> ('a * 'b * 'c) pretty_printer

Pretty-prints a triple. The arguments are:

  • A pretty-printing function for the first element.
  • A pretty-printing function for the second element.
  • A pretty-printing function for the third element.
  • The formatter.
  • The triple.
Sourceval pp_quadruple : 'a pretty_printer -> 'b pretty_printer -> 'c pretty_printer -> 'd pretty_printer -> ('a * 'b * 'c * 'd) pretty_printer

Pretty-prints a quadruple. The arguments are:

  • A pretty-printing function for the first element.
  • A pretty-printing function for the second element.
  • A pretty-printing function for the third element.
  • A pretty-printing function for the fourth element.
  • The formatter.
  • The quadruple.
Sourceval pp_quintuple : 'a pretty_printer -> 'b pretty_printer -> 'c pretty_printer -> 'd pretty_printer -> 'e pretty_printer -> ('a * 'b * 'c * 'd * 'e) pretty_printer

Pretty-prints a quintuple. The arguments are:

  • A pretty-printing function for the first element.
  • A pretty-printing function for the second element.
  • A pretty-printing function for the third element.
  • A pretty-printing function for the fourth element.
  • The formatter.
  • The quintuple.
Sourceval pp_list : 'a pretty_printer -> 'a list pretty_printer

Pretty-prints a list. The arguments are:

  • The pretty-printing function for the list.
  • The formatter to use.
  • The list.
Sourceval pp_map : 'k pretty_printer -> 'v pretty_printer -> ('d -> ('k * 'v) Batteries.Enum.t) -> 'd pretty_printer

Pretty-prints a dictionary data structure. The arguments are:

  • The pretty-printing function for the key.
  • The pretty-printing function for the value.
  • The enumeration function for the dictionary.
  • The formatter to use.
  • The dictionary.
Sourceval pp_set : 'a pretty_printer -> ('s -> 'a Batteries.Enum.t) -> 's pretty_printer

Pretty-prints a set data structure. The arguments are:

  • The pretty-printing function for a value.
  • The enumeration function for the set.
  • The formatter to use.
  • The dictionary.
Sourceval pp_option : 'a pretty_printer -> 'a option pretty_printer

Pretty-prints an option value.

Sourceval pp_to_string : 'a pretty_printer -> 'a -> string

Given a pretty printer and an object, generates a string for them.

Sourceval pp_suffix : 'a pretty_printer -> string -> 'a pretty_printer

Suffixes a pretty printer with a fixed string.

Sourcemodule type Pp = sig ... end

The type of modules which give a pretty printer.

Sourcemodule Set_pp (S : Batteries.Set.S) (P : Pp with type t = S.elt) : sig ... end

A functor which generates a pretty printer for an existing functorized set module.

Sourcemodule Map_pp (M : Batteries.Map.S) (P : Pp with type t = M.key) : sig ... end

A functor which generates a pretty printer for an existing functorized map module.