summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Scherer <gabriel.scherer@gmail.com>2017-08-21 11:40:36 +0200
committerGitHub <noreply@github.com>2017-08-21 11:40:36 +0200
commit14f142b1861af676b961047f344efebfb824f726 (patch)
tree11442a085d607509a7b4a84ed78fafe844bd9696
parentee12b8b64abe6073ad2bc33dd528d3e11fee74bd (diff)
parentd7fb41dd14e214ba8ac25c4ebace0e55cb50ac53 (diff)
downloadocaml-14f142b1861af676b961047f344efebfb824f726.tar.gz
Merge pull request #1290 from Octachron/doc_reorganize_format
Documentation: fix minor issues within Format
-rw-r--r--Changes6
-rw-r--r--stdlib/format.mli32
2 files changed, 20 insertions, 18 deletions
diff --git a/Changes b/Changes
index 2abe2a3ffc..10dba6f777 100644
--- a/Changes
+++ b/Changes
@@ -93,6 +93,12 @@ Working version
the unaligned part, which is useful for Tuple options.
(Nicolas Ojeda Bar, review by Alain Frisch and Gabriel Scherer)
+* GPR#615: Format, add symbolic formatters that output symbolic
+ pretty-printing items. New fields have been added to the
+ formatter_out_functions record, thus this change will break any code building
+ such record from scratch.
+ (Richard Bonichon and Pierre Weiss, review by Alain Frisch)
+
* GPR#943: Fixed the divergence of the Pervasives module between the stdlib
and threads implementations. In rare circumstances this can change the
behavior of existing applications: the implementation of Pervasives.close_out
diff --git a/stdlib/format.mli b/stdlib/format.mli
index 511e69ed3a..50ef082966 100644
--- a/stdlib/format.mli
+++ b/stdlib/format.mli
@@ -762,7 +762,7 @@ val formatter_of_out_functions :
See definition of type {!formatter_out_functions} for the meaning of argument
[out_funs].
- @since 4.04.0
+ @since 4.06.0
*)
(** {7 Symbolic pretty-printing} *)
@@ -788,47 +788,43 @@ val formatter_of_out_functions :
*)
type symbolic_output_item =
- | Output_flush
- | Output_newline
+ | Output_flush (** symbolic flush command *)
+ | Output_newline (** symbolic newline command *)
| Output_string of string
+ (** [Output_string s]: symbolic output for string [s]*)
| Output_spaces of int
+ (** [Output_spaces n]: symbolic command to output [n] spaces *)
| Output_indent of int
-(**
- The output items that symbolic pretty-printers will produce:
- - [Output_flush]: symbolic flush command.
- - [Output_newline]: symbolic newline command.
- - [Output_string s]: symbolic output for string [s].
- - [Output_spaces n]: symbolic command to output [n] spaces.
- - [Output_indent i]: symbolic indentation of size [i].
-
- @since 4.04.0
+ (** [Output_indent i]: symbolic indentation of size [i] *)
+(** Items produced by symbolic pretty-printers
+ @since 4.06.0
*)
type symbolic_output_buffer
(**
The output buffer of a symbolic pretty-printer.
- @since 4.04.0
+ @since 4.06.0
*)
val make_symbolic_output_buffer : unit -> symbolic_output_buffer
(** [make_symbolic_output_buffer ()] returns a fresh buffer for
symbolic output.
- @since 4.04.0
+ @since 4.06.0
*)
val clear_symbolic_output_buffer : symbolic_output_buffer -> unit
(** [clear_symbolic_output_buffer sob] resets buffer [sob].
- @since 4.04.0
+ @since 4.06.0
*)
val get_symbolic_output_buffer :
symbolic_output_buffer -> symbolic_output_item list
(** [get_symbolic_output_buffer sob] returns the contents of buffer [sob].
- @since 4.04.0
+ @since 4.06.0
*)
val flush_symbolic_output_buffer :
@@ -839,7 +835,7 @@ val flush_symbolic_output_buffer :
[let items = get_symbolic_output_buffer sob in
clear_symbolic_output_buffer sob; items]
- @since 4.04.0
+ @since 4.06.0
*)
val add_symbolic_output_item :
@@ -851,7 +847,7 @@ val formatter_of_symbolic_output_buffer : symbolic_output_buffer -> formatter
(** [formatter_of_symbolic_output_buffer sob] returns a symbolic formatter
that outputs to [symbolic_output_buffer] [sob].
- @since 4.04.0
+ @since 4.06.0
*)
(** {6 Basic functions for formatters} *)