Pretty-printing of S-expressions.
Warning! It is not recommended to use this library in critical code, and certainly not in a context where the sexp produced by that module are expected to be parsed again. There is no guarantee that the code won't raise. The scrutiny of review is low at the moment and some work would be required to bump it. Suitable for human readable sexps only. It was added to the base projection to allow expect tests to more easily generate more readable s-expressions, even when used in contexts that require base-projection only code.
module type S : sig ... endinclude S with type S.sexp := Sexplib.Sexp.tval pp_formatter : Caml.Format.formatter writerpp_formatter conf fmt sexp will mutate the fmt with functions such as
set_formatter_tag_functions
val pp_formatter' : next:(Base.unit ‑> sexp Base.option) ‑> Config.t ‑> Caml.Format.formatter ‑> Base.unitval pp_buffer : Base.Buffer.t writerval pp_blit : (Base.string, Base.unit) Base.Blit.sub writerval pretty_string : Config.t ‑> sexp ‑> Base.stringpretty_string needs to allocate. If you care about performance, using one of the
pp_* functions above is advised.
val sexp_to_string : sexp ‑> Base.stringmodule Sexp_with_layout : S with type sexp := Sexplib.Sexp.With_layout.t_or_commentmodule Normalize : sig ... endval sexp_to_sexp_or_comment : Sexplib.Sexp.t ‑> Sexplib.Sexp.With_layout.t_or_comment