Skip to content

Commit

Permalink
Pp.render -> Pp.to_fmt
Browse files Browse the repository at this point in the history
Signed-off-by: Jeremie Dimino <[email protected]>
  • Loading branch information
jeremiedimino committed Mar 18, 2020
1 parent f84c597 commit d7bd0be
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/pp.ml
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@ module Render = struct
| Tag (tag, t) -> tag_handler ppf tag t
end

let render = Render.render
let to_fmt_with_tags = Render.render

let rec render_ignore_tags ppf t =
render ppf t ~tag_handler:(fun ppf _tag t -> render_ignore_tags ppf t)
let rec to_fmt ppf t =
Render.render ppf t ~tag_handler:(fun ppf _tag t -> to_fmt ppf t)

let nop = Nop

Expand Down
6 changes: 3 additions & 3 deletions src/pp.mli
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ end
(** {1 Rendering} *)

(** Render a document to a classic formatter *)
val render :
val to_fmt : Format.formatter -> _ t -> unit

val to_fmt_with_tags :
Format.formatter
-> 'a t
-> tag_handler:(Format.formatter -> 'a -> 'a t -> unit)
-> unit

val render_ignore_tags : Format.formatter -> 'a t -> unit
2 changes: 1 addition & 1 deletion test/tests.ml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
let pp pp = Format.printf "%a@." Pp.render_ignore_tags pp
let pp pp = Format.printf "%a@." Pp.to_fmt pp

let enum_x_and_y =
Pp.enumerate [ Array.make 50 "x"; Array.make 50 "y" ] ~f:(fun a ->
Expand Down

0 comments on commit d7bd0be

Please sign in to comment.