package stdcompat

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Stdlib.FormatSource

Sourcetype formatter = Format.formatter
Sourcetype geometry = Format.geometry = {
  1. max_indent : int;
  2. margin : int;
}
  • since 4.08.0: type geometry = {

max_indent: int ; margin: int

}

Sourcetype stag = Format.stag = ..
  • since 4.08.0: type stag = ..
Sourcetype tag = string

Alias for Format.tag

Sourcetype formatter_out_functions = Format.formatter_out_functions = {
  1. out_string : string -> int -> int -> unit;
  2. out_flush : unit -> unit;
  3. out_newline : unit -> unit;
  4. out_spaces : int -> unit;
  5. out_indent : int -> unit;
}
  • since 4.06.0:

type formatter_out_functions = out_string: string -> int -> int -> unit ; out_flush: unit -> unit ; out_newline: unit -> unit ; out_spaces: int -> unit ; out_indent: int -> unit

Sourcetype formatter_stag_functions = Format.formatter_stag_functions = {
  1. mark_open_stag : stag -> string;
  2. mark_close_stag : stag -> string;
  3. print_open_stag : stag -> unit;
  4. print_close_stag : stag -> unit;
}
  • since 4.08.0:

type formatter_stag_functions = mark_open_stag: stag -> string ; mark_close_stag: stag -> string ; print_open_stag: stag -> unit ; print_close_stag: stag -> unit

Sourcetype symbolic_output_item = Format.symbolic_output_item =
  1. | Output_flush
  2. | Output_newline
  3. | Output_string of string
  4. | Output_spaces of int
  5. | Output_indent of int
  • since 4.06.0:

type symbolic_output_item = | Output_flush | Output_newline | Output_string of string | Output_spaces of int | Output_indent of int

Sourcetype symbolic_output_buffer = Format.symbolic_output_buffer
  • since 4.06.0: type symbolic_output_buffer
Sourceval pp_print_nothing : formatter -> unit -> unit
  • since 5.2.0: val pp_print_nothing : formatter -> unit -> unit
Sourceval pp_infinity : int
  • since 5.2.0: val pp_infinity : int
Sourceval pp_print_iter : ?pp_sep:(formatter -> unit -> unit) -> (('a -> unit) -> 'b -> unit) -> (formatter -> 'a -> unit) -> formatter -> 'b -> unit
  • since 5.1.0:

val pp_print_iter : ?pp_sep:(formatter -> unit -> unit) -> (('a -> unit) -> 'b -> unit) -> (formatter -> 'a -> unit) -> formatter -> 'b -> unit

Sourceval pp_print_array : ?pp_sep:(formatter -> unit -> unit) -> (formatter -> 'a -> unit) -> formatter -> 'a array -> unit
  • since 5.1.0:

val pp_print_array : ?pp_sep:(formatter -> unit -> unit) -> (formatter -> 'a -> unit) -> formatter -> 'a array -> unit

Sourceval synchronized_formatter_of_out_channel : out_channel -> formatter Stdcompat__domain.DLS.key
  • since 5.0.0:

val synchronized_formatter_of_out_channel : out_channel -> formatter Stdcompat__domain.DLS.key

Sourceval get_std_formatter : unit -> formatter
  • since 5.0.0: val get_std_formatter : unit -> formatter
Sourceval get_err_formatter : unit -> formatter
  • since 5.0.0: val get_err_formatter : unit -> formatter
Sourceval get_stdbuf : unit -> Buffer.t
  • since 5.0.0: val get_stdbuf : unit -> Buffer.t
Sourceval get_str_formatter : unit -> formatter
  • since 5.0.0: val get_str_formatter : unit -> formatter
Sourceval make_synchronized_formatter : (string -> int -> int -> unit) -> (unit -> unit) -> formatter Stdcompat__domain.DLS.key
  • since 5.0.0:

val make_synchronized_formatter : (string -> int -> int -> unit) -> (unit -> unit) -> formatter Stdcompat__domain.DLS.key

Sourceval pp_print_bytes : formatter -> bytes -> unit
  • since 4.13.0: val pp_print_bytes : formatter -> bytes -> unit
Sourceval print_bytes : bytes -> unit
  • since 4.13.0: val print_bytes : bytes -> unit
Sourceval pp_print_either : left:(formatter -> 'a -> unit) -> right:(formatter -> 'b -> unit) -> formatter -> ('a, 'b) Either.t -> unit
  • since 4.13.0:

val pp_print_either : left:(formatter -> 'a -> unit) -> right:(formatter -> 'b -> unit) -> formatter -> ('a, 'b) Either.t -> unit

Sourceval pp_print_seq : ?pp_sep:(formatter -> unit -> unit) -> (formatter -> 'a -> unit) -> formatter -> 'a Seq.t -> unit
  • since 4.12.0:

val pp_print_seq : ?pp_sep:(formatter -> unit -> unit) -> (formatter -> 'a -> unit) -> formatter -> 'a Seq.t -> unit

Sourceval pp_update_geometry : formatter -> (geometry -> geometry) -> unit
  • since 4.11.0:

val pp_update_geometry : formatter -> (geometry -> geometry) -> unit

Sourceval update_geometry : (geometry -> geometry) -> unit
  • since 4.11.0: val update_geometry : (geometry -> geometry) -> unit
Sourceval pp_print_custom_break : formatter -> fits:(string * int * string) -> breaks:(string * int * string) -> unit
  • since 4.08.0:

val pp_print_custom_break : formatter -> fits:(string * int * string) -> breaks:(string * int * string) -> unit

Sourceval check_geometry : geometry -> bool
  • since 4.08.0: val check_geometry : geometry -> bool
Sourceval pp_set_geometry : formatter -> max_indent:int -> margin:int -> unit
  • since 4.08.0:

val pp_set_geometry : formatter -> max_indent:int -> margin:int -> unit

Sourceval set_geometry : max_indent:int -> margin:int -> unit
  • since 4.08.0: val set_geometry : max_indent:int -> margin:int -> unit
Sourceval pp_safe_set_geometry : formatter -> max_indent:int -> margin:int -> unit
  • since 4.08.0:

val pp_safe_set_geometry : formatter -> max_indent:int -> margin:int -> unit

Sourceval safe_set_geometry : max_indent:int -> margin:int -> unit
  • since 4.08.0:

val safe_set_geometry : max_indent:int -> margin:int -> unit

Sourceval pp_get_geometry : formatter -> unit -> geometry
  • since 4.08.0: val pp_get_geometry : formatter -> unit -> geometry
Sourceval get_geometry : unit -> geometry
  • since 4.08.0: val get_geometry : unit -> geometry
Sourceval pp_open_stag : formatter -> stag -> unit
  • since 4.08.0: val pp_open_stag : formatter -> stag -> unit
Sourceval open_stag : stag -> unit
  • since 4.08.0: val open_stag : stag -> unit
Sourceval pp_close_stag : formatter -> unit -> unit
  • since 4.08.0: val pp_close_stag : formatter -> unit -> unit
Sourceval close_stag : unit -> unit
  • since 4.08.0: val close_stag : unit -> unit
Sourceval pp_set_formatter_stag_functions : formatter -> formatter_stag_functions -> unit
  • since 4.08.0:

val pp_set_formatter_stag_functions : formatter -> formatter_stag_functions -> unit

Sourceval set_formatter_stag_functions : formatter_stag_functions -> unit
  • since 4.08.0:

val set_formatter_stag_functions : formatter_stag_functions -> unit

Sourceval pp_get_formatter_stag_functions : formatter -> unit -> formatter_stag_functions
  • since 4.08.0:

val pp_get_formatter_stag_functions : formatter -> unit -> formatter_stag_functions

Sourceval get_formatter_stag_functions : unit -> formatter_stag_functions
  • since 4.08.0:

val get_formatter_stag_functions : unit -> formatter_stag_functions

Sourceval pp_print_option : ?none:(formatter -> unit -> unit) -> (formatter -> 'a -> unit) -> formatter -> 'a option -> unit
  • since 4.08.0:

val pp_print_option : ?none:(formatter -> unit -> unit) -> (formatter -> 'a -> unit) -> formatter -> 'a option -> unit

Sourceval pp_print_result : ok:(formatter -> 'a -> unit) -> error:(formatter -> 'e -> unit) -> formatter -> ('a, 'e) result -> unit
  • since 4.08.0:

val pp_print_result : ok:(formatter -> 'a -> unit) -> error:(formatter -> 'e -> unit) -> formatter -> ('a, 'e) result -> unit

Sourceval dprintf : ('a, formatter, unit, formatter -> unit) format4 -> 'a
  • since 4.08.0:

val dprintf : ('a, formatter, unit, formatter -> unit) format4 -> 'a

Sourceval kdprintf : ((formatter -> unit) -> 'a) -> ('b, formatter, unit, 'a) format4 -> 'b
  • since 4.08.0:

val kdprintf : ((formatter -> unit) -> 'a) -> ('b, formatter, unit, 'a) format4 -> 'b

Sourceval formatter_of_out_functions : formatter_out_functions -> formatter
  • since 4.06.0:

val formatter_of_out_functions : formatter_out_functions -> formatter

Sourceval make_symbolic_output_buffer : unit -> symbolic_output_buffer
  • since 4.06.0:

val make_symbolic_output_buffer : unit -> symbolic_output_buffer

Sourceval clear_symbolic_output_buffer : symbolic_output_buffer -> unit
  • since 4.06.0:

val clear_symbolic_output_buffer : symbolic_output_buffer -> unit

Sourceval get_symbolic_output_buffer : symbolic_output_buffer -> symbolic_output_item list
  • since 4.06.0:

val get_symbolic_output_buffer : symbolic_output_buffer -> symbolic_output_item list

Sourceval flush_symbolic_output_buffer : symbolic_output_buffer -> symbolic_output_item list
  • since 4.06.0:

val flush_symbolic_output_buffer : symbolic_output_buffer -> symbolic_output_item list

Sourceval add_symbolic_output_item : symbolic_output_buffer -> symbolic_output_item -> unit
  • since 4.06.0:

val add_symbolic_output_item : symbolic_output_buffer -> symbolic_output_item -> unit

Sourceval formatter_of_symbolic_output_buffer : symbolic_output_buffer -> formatter
  • since 4.06.0:

val formatter_of_symbolic_output_buffer : symbolic_output_buffer -> formatter

Sourceval kasprintf : (string -> 'a) -> ('b, formatter, unit, 'a) format4 -> 'b
  • since 4.03.0:

val kasprintf : (string -> 'a) -> ('b, formatter, unit, 'a) format4 -> 'b

Sourceval pp_print_list : ?pp_sep:(formatter -> unit -> unit) -> (formatter -> 'a -> unit) -> formatter -> 'a list -> unit
  • since 4.02.0:

val pp_print_list : ?pp_sep:(formatter -> unit -> unit) -> (formatter -> 'a -> unit) -> formatter -> 'a list -> unit

Sourceval pp_print_text : formatter -> string -> unit
  • since 4.02.0: val pp_print_text : formatter -> string -> unit
Sourceval pp_set_formatter_out_functions : formatter -> formatter_out_functions -> unit
  • since 4.01.0:

val pp_set_formatter_out_functions : formatter -> formatter_out_functions -> unit

Sourceval set_formatter_out_functions : formatter_out_functions -> unit
  • since 4.01.0:

val set_formatter_out_functions : formatter_out_functions -> unit

Sourceval pp_get_formatter_out_functions : formatter -> unit -> formatter_out_functions
  • since 4.01.0:

val pp_get_formatter_out_functions : formatter -> unit -> formatter_out_functions

Sourceval get_formatter_out_functions : unit -> formatter_out_functions
  • since 4.01.0:

val get_formatter_out_functions : unit -> formatter_out_functions

Sourceval asprintf : ('a, formatter, unit, string) format4 -> 'a
  • since 4.01.0: val asprintf : ('a, formatter, unit, string) format4 -> 'a
Sourceval ikfprintf : (formatter -> 'a) -> formatter -> ('b, formatter, unit, 'a) format4 -> 'b
  • since 3.12.0:

val ikfprintf : (formatter -> 'a) -> formatter -> ('b, formatter, unit, 'a) format4 -> 'b

Sourceval ifprintf : formatter -> ('a, formatter, unit) format -> 'a
  • since 3.10.0:

val ifprintf : formatter -> ('a, formatter, unit) format -> 'a

Sourceval kfprintf : (formatter -> 'a) -> formatter -> ('b, formatter, unit, 'a) format4 -> 'b
  • since 3.08.0:

val kfprintf : (formatter -> 'a) -> formatter -> ('b, formatter, unit, 'a) format4 -> 'b

Sourceval ksprintf : (string -> 'a) -> ('b, unit, string, 'a) format4 -> 'b
  • since 3.08.0:

val ksprintf : (string -> 'a) -> ('b, unit, string, 'a) format4 -> 'b

Sourceval pp_open_box : formatter -> int -> unit
Sourceval open_box : int -> unit

Alias for Format.open_box

Sourceval pp_close_box : formatter -> unit -> unit
Sourceval close_box : unit -> unit
Sourceval pp_open_hbox : formatter -> unit -> unit
Sourceval open_hbox : unit -> unit
Sourceval pp_open_vbox : formatter -> int -> unit
Sourceval open_vbox : int -> unit
Sourceval pp_open_hvbox : formatter -> int -> unit
Sourceval open_hvbox : int -> unit
Sourceval pp_open_hovbox : formatter -> int -> unit
Sourceval open_hovbox : int -> unit
Sourceval pp_print_string : formatter -> string -> unit
Sourceval pp_print_substring : pos:int -> len:int -> formatter -> string -> unit
Sourceval print_substring : pos:int -> len:int -> string -> unit
Sourceval pp_print_substring_as : pos:int -> len:int -> formatter -> int -> string -> unit
Sourceval print_substring_as : pos:int -> len:int -> int -> string -> unit
Sourceval print_string : string -> unit
Sourceval pp_print_as : formatter -> int -> string -> unit
Sourceval print_as : int -> string -> unit

Alias for Format.print_as

Sourceval pp_print_int : formatter -> int -> unit
Sourceval print_int : int -> unit
Sourceval pp_print_float : formatter -> float -> unit
Sourceval print_float : float -> unit
Sourceval pp_print_char : formatter -> char -> unit
Sourceval print_char : char -> unit
Sourceval pp_print_bool : formatter -> bool -> unit
Sourceval print_bool : bool -> unit
Sourceval pp_print_space : formatter -> unit -> unit
Sourceval print_space : unit -> unit
Sourceval pp_print_cut : formatter -> unit -> unit
Sourceval print_cut : unit -> unit
Sourceval pp_print_break : formatter -> int -> int -> unit
Sourceval print_break : int -> int -> unit
Sourceval pp_force_newline : formatter -> unit -> unit
Sourceval force_newline : unit -> unit
Sourceval pp_print_if_newline : formatter -> unit -> unit
Sourceval print_if_newline : unit -> unit
Sourceval pp_print_flush : formatter -> unit -> unit
Sourceval print_flush : unit -> unit
Sourceval pp_print_newline : formatter -> unit -> unit
Sourceval print_newline : unit -> unit
Sourceval pp_set_margin : formatter -> int -> unit
Sourceval set_margin : int -> unit
Sourceval pp_get_margin : formatter -> unit -> int
Sourceval get_margin : unit -> int
Sourceval pp_set_max_indent : formatter -> int -> unit
Sourceval set_max_indent : int -> unit
Sourceval pp_get_max_indent : formatter -> unit -> int
Sourceval get_max_indent : unit -> int
Sourceval pp_set_max_boxes : formatter -> int -> unit
Sourceval set_max_boxes : int -> unit
Sourceval pp_get_max_boxes : formatter -> unit -> int
Sourceval get_max_boxes : unit -> int
Sourceval pp_over_max_boxes : formatter -> unit -> bool
Sourceval over_max_boxes : unit -> bool
Sourceval pp_open_tbox : formatter -> unit -> unit
  • since 4.06.0: val pp_open_tbox : formatter -> unit -> unit
  • since 4.03.0:

val pp_open_tbox : formatter -> unit -> unit@@ocaml.deprecated "Tabulation boxes are not supported any more."

  • since 3.07.0: val pp_open_tbox : formatter -> unit -> unit
Sourceval open_tbox : unit -> unit
  • since 4.06.0: val open_tbox : unit -> unit
  • since 4.03.0:

val open_tbox : unit -> unit@@ocaml.deprecated "Tabulation boxes are not supported any more."

  • since 3.07.0: val open_tbox : unit -> unit
Sourceval pp_close_tbox : formatter -> unit -> unit
  • since 4.06.0: val pp_close_tbox : formatter -> unit -> unit
  • since 4.03.0:

val pp_close_tbox : formatter -> unit -> unit@@ocaml.deprecated "Tabulation boxes are not supported any more."

  • since 3.07.0: val pp_close_tbox : formatter -> unit -> unit
Sourceval close_tbox : unit -> unit
  • since 4.06.0: val close_tbox : unit -> unit
  • since 4.03.0:

val close_tbox : unit -> unit@@ocaml.deprecated "Tabulation boxes are not supported any more."

  • since 3.07.0: val close_tbox : unit -> unit
Sourceval pp_set_tab : formatter -> unit -> unit
  • since 4.06.0: val pp_set_tab : formatter -> unit -> unit
  • since 4.03.0:

val pp_set_tab : formatter -> unit -> unit@@ocaml.deprecated "Tabulation boxes are not supported any more."

  • since 3.07.0: val pp_set_tab : formatter -> unit -> unit
Sourceval set_tab : unit -> unit
  • since 4.06.0: val set_tab : unit -> unit
  • since 4.03.0:

val set_tab : unit -> unit@@ocaml.deprecated "Tabulation boxes are not supported any more."

  • since 3.07.0: val set_tab : unit -> unit
Sourceval pp_print_tab : formatter -> unit -> unit
  • since 4.06.0: val pp_print_tab : formatter -> unit -> unit
  • since 4.03.0:

val pp_print_tab : formatter -> unit -> unit@@ocaml.deprecated "Tabulation boxes are not supported any more."

  • since 3.07.0: val pp_print_tab : formatter -> unit -> unit
Sourceval print_tab : unit -> unit
  • since 4.06.0: val print_tab : unit -> unit
  • since 4.03.0:

val print_tab : unit -> unit@@ocaml.deprecated "Tabulation boxes are not supported any more."

  • since 3.07.0: val print_tab : unit -> unit
Sourceval pp_print_tbreak : formatter -> int -> int -> unit
  • since 4.06.0: val pp_print_tbreak : formatter -> int -> int -> unit
  • since 4.03.0:

val pp_print_tbreak : formatter -> int -> int -> unit@@ocaml.deprecated "Tabulation boxes are not supported any more."

  • since 3.07.0: val pp_print_tbreak : formatter -> int -> int -> unit
Sourceval print_tbreak : int -> int -> unit
  • since 4.06.0: val print_tbreak : int -> int -> unit
  • since 4.03.0:

val print_tbreak : int -> int -> unit@@ocaml.deprecated "Tabulation boxes are not supported any more."

  • since 3.07.0: val print_tbreak : int -> int -> unit
Sourceval pp_set_ellipsis_text : formatter -> string -> unit
Sourceval set_ellipsis_text : string -> unit
Sourceval pp_get_ellipsis_text : formatter -> unit -> string
Sourceval get_ellipsis_text : unit -> string
Sourceval pp_set_tags : formatter -> bool -> unit
Sourceval set_tags : bool -> unit

Alias for Format.set_tags

Sourceval pp_set_print_tags : formatter -> bool -> unit
Sourceval set_print_tags : bool -> unit
Sourceval pp_set_mark_tags : formatter -> bool -> unit
Sourceval set_mark_tags : bool -> unit
Sourceval pp_get_print_tags : formatter -> unit -> bool
Sourceval get_print_tags : unit -> bool
Sourceval pp_get_mark_tags : formatter -> unit -> bool
Sourceval get_mark_tags : unit -> bool
Sourceval pp_set_formatter_out_channel : formatter -> out_channel -> unit
Sourceval set_formatter_out_channel : out_channel -> unit
Sourceval pp_set_formatter_output_functions : formatter -> (string -> int -> int -> unit) -> (unit -> unit) -> unit
Sourceval set_formatter_output_functions : (string -> int -> int -> unit) -> (unit -> unit) -> unit
Sourceval pp_get_formatter_output_functions : formatter -> unit -> (string -> int -> int -> unit) * (unit -> unit)
Sourceval get_formatter_output_functions : unit -> (string -> int -> int -> unit) * (unit -> unit)
Sourceval formatter_of_out_channel : out_channel -> formatter
Sourceval std_formatter : formatter
Sourceval err_formatter : formatter
Sourceval formatter_of_buffer : Buffer.t -> formatter
Sourceval stdbuf : Buffer.t

Alias for Format.stdbuf

Sourceval str_formatter : formatter
Sourceval flush_str_formatter : unit -> string
Sourceval make_formatter : (string -> int -> int -> unit) -> (unit -> unit) -> formatter
Sourceval fprintf : formatter -> ('a, formatter, unit) format -> 'a

Alias for Format.fprintf

Sourceval printf : ('a, formatter, unit) format -> 'a

Alias for Format.printf

Sourceval eprintf : ('a, formatter, unit) format -> 'a

Alias for Format.eprintf

Sourceval sprintf : ('a, unit, string) format -> 'a

Alias for Format.sprintf