mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2026-01-23 01:26:41 -05:00
rename CCChar.{print,pp} and CCHeap.print (closes #181)
This commit is contained in:
parent
3b8f7099cb
commit
2939dcbf1d
4 changed files with 14 additions and 9 deletions
|
|
@ -8,8 +8,8 @@ include Char
|
|||
|
||||
let equal (a:char) b = Pervasives.(=) a b
|
||||
|
||||
let pp = Buffer.add_char
|
||||
let print = Format.pp_print_char
|
||||
let pp_buf = Buffer.add_char
|
||||
let pp = Format.pp_print_char
|
||||
|
||||
let of_int_exn = Char.chr
|
||||
let of_int c = try Some (of_int_exn c) with _ -> None
|
||||
|
|
|
|||
|
|
@ -40,5 +40,8 @@ val to_int : t -> int
|
|||
Return the ASCII code of the argument.
|
||||
@since 1.0 *)
|
||||
|
||||
val pp : Buffer.t -> t -> unit
|
||||
val print : Format.formatter -> t -> unit
|
||||
val pp_buf : Buffer.t -> t -> unit
|
||||
(** Used to be {!pp}, changed name @since NEXT_RELEASE *)
|
||||
|
||||
val pp : Format.formatter -> t -> unit
|
||||
(** Used to be {!print}, changed name @since NEXT_RELEASE *)
|
||||
|
|
|
|||
|
|
@ -186,8 +186,9 @@ module type S = sig
|
|||
|
||||
val to_tree : t -> elt ktree
|
||||
|
||||
val print : ?sep:string -> elt printer -> t printer
|
||||
(** @since 0.16 *)
|
||||
val pp : ?sep:string -> elt printer -> t printer
|
||||
(** @since 0.16
|
||||
Renamed from {!print} @since NEXT_RELEASE *)
|
||||
end
|
||||
|
||||
module Make(E : PARTIAL_ORD) : S with type elt = E.t = struct
|
||||
|
|
@ -387,7 +388,7 @@ module Make(E : PARTIAL_ORD) : S with type elt = E.t = struct
|
|||
| E -> `Nil
|
||||
| N (_, x, l, r) -> `Node(x, [to_tree l; to_tree r])
|
||||
|
||||
let print ?(sep=",") pp_elt out h =
|
||||
let pp ?(sep=",") pp_elt out h =
|
||||
let first=ref true in
|
||||
iter
|
||||
(fun x ->
|
||||
|
|
|
|||
|
|
@ -124,8 +124,9 @@ module type S = sig
|
|||
|
||||
val to_tree : t -> elt ktree
|
||||
|
||||
val print : ?sep:string -> elt printer -> t printer
|
||||
(** @since 0.16 *)
|
||||
val pp : ?sep:string -> elt printer -> t printer
|
||||
(** @since 0.16
|
||||
Renamed from {!print} @since NEXT_RELEASE *)
|
||||
end
|
||||
|
||||
module Make(E : PARTIAL_ORD) : S with type elt = E.t
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue