fix CCPrint.unit, add CCPrint.silent

This commit is contained in:
Simon Cruanes 2014-06-26 00:10:10 +02:00
parent 451e761c8e
commit d30b36dce9
2 changed files with 6 additions and 2 deletions

View file

@ -38,7 +38,9 @@ type 'a t = Buffer.t -> 'a -> unit
(** {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 string buf s = Buffer.add_string buf s
let bool buf b = Printf.bprintf buf "%B" b

View file

@ -38,7 +38,9 @@ type 'a t = Buffer.t -> 'a -> unit
(** {2 Combinators} *)
val unit : unit t (* prints nothing! *)
val silent : 'a t (** prints nothing *)
val unit : unit t
val int : int t
val string : string t
val bool : bool t