mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 19:25:28 -05:00
fix CCPrint.unit, add CCPrint.silent
This commit is contained in:
parent
451e761c8e
commit
d30b36dce9
2 changed files with 6 additions and 2 deletions
|
|
@ -38,7 +38,9 @@ type 'a t = Buffer.t -> 'a -> unit
|
||||||
|
|
||||||
(** {2 Combinators} *)
|
(** {2 Combinators} *)
|
||||||
|
|
||||||
let unit buf () = ()
|
let silent buf _ = ()
|
||||||
|
|
||||||
|
let unit buf () = Buffer.add_string buf "()"
|
||||||
let int buf i = Buffer.add_string buf (string_of_int i)
|
let int buf i = Buffer.add_string buf (string_of_int i)
|
||||||
let string buf s = Buffer.add_string buf s
|
let string buf s = Buffer.add_string buf s
|
||||||
let bool buf b = Printf.bprintf buf "%B" b
|
let bool buf b = Printf.bprintf buf "%B" b
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,9 @@ type 'a t = Buffer.t -> 'a -> unit
|
||||||
|
|
||||||
(** {2 Combinators} *)
|
(** {2 Combinators} *)
|
||||||
|
|
||||||
val unit : unit t (* prints nothing! *)
|
val silent : 'a t (** prints nothing *)
|
||||||
|
|
||||||
|
val unit : unit t
|
||||||
val int : int t
|
val int : int t
|
||||||
val string : string t
|
val string : string t
|
||||||
val bool : bool t
|
val bool : bool t
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue