Source file sexp_pretty_intf.ml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
open! Base
module type S = sig
type sexp
type 'a writer = Config.t -> 'a -> sexp -> unit
(** [pp_formatter conf fmt sexp] will mutate the fmt with functions such as
[set_formatter_tag_functions] *)
val pp_formatter : Stdlib.Format.formatter writer
val pp_formatter'
: next:(unit -> sexp option)
-> Config.t
-> Stdlib.Format.formatter
-> unit
val pp_buffer : Buffer.t writer
val pp_out_channel : Stdlib.out_channel writer
val pp_blit : (string, unit) Blit.sub writer
(** [pretty_string] needs to allocate. If you care about performance, using one of the
[pp_*] functions above is advised. *)
val pretty_string : Config.t -> sexp -> string
val sexp_to_string : sexp -> string
end
(** Pretty-printing of S-expressions *)
module type Sexp_pretty = sig
module Config = Config
module type S = S
include S with type sexp := Sexp.t
module Sexp_with_layout : S with type sexp := Sexplib.Sexp.With_layout.t_or_comment
module Normalize : sig
type t =
| Sexp of sexp * string list
and sexp =
| Atom of string
| List of t list
end
end