From 719d048f570a98334679d32c83797b54b68abade Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Tue, 7 Mar 2017 09:24:03 +0100 Subject: [PATCH] add `CCFormat.flush` --- src/core/CCFormat.ml | 1 + src/core/CCFormat.mli | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/core/CCFormat.ml b/src/core/CCFormat.ml index a4850947..d68f53d3 100644 --- a/src/core/CCFormat.ml +++ b/src/core/CCFormat.ml @@ -37,6 +37,7 @@ let int32 fmt n = Format.fprintf fmt "%ld" n let int64 fmt n = Format.fprintf fmt "%Ld" n let nativeint fmt n = Format.fprintf fmt "%nd" n let string_quoted fmt s = Format.fprintf fmt "\"%s\"" s +let flush = Format.pp_print_flush let list ?(sep=return ",@ ") pp fmt l = let rec pp_list l = match l with diff --git a/src/core/CCFormat.mli b/src/core/CCFormat.mli index 3880dcfd..02be1976 100644 --- a/src/core/CCFormat.mli +++ b/src/core/CCFormat.mli @@ -28,6 +28,10 @@ val int32 : int32 printer (** @since 0.14 *) val int64 : int64 printer (** @since 0.14 *) val nativeint : nativeint printer (** @since 0.14 *) +val flush : unit printer +(** Alias to {!Format.pp_print_flush}. + @since NEXT_RELEASE *) + val string_quoted : string printer (** Similar to {!CCString.print}. @since 0.14 *)