Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
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 Config : sig ... end
module type S = sig ... end
include S with type sexp := Sexp_pretty.Import.Sexp.t
type 'a writer = Config.t -> 'a -> Sexp_pretty.Import.Sexp.t -> Import.unit
val pp_formatter : Sexp_pretty.Import.Format.formatter writer
pp_formatter conf fmt sepx
will mutate the fmt with functions such as set_formatter_tag_functions
val pp_buffer : Sexp_pretty.Import.Buffer.t writer
val pp_out_channel : Import.Out_channel.t writer
val pp_blit : (Import.string, Import.unit) Sexp_pretty.Import.Blit.sub writer
val pretty_string : Config.t -> Sexp_pretty.Import.Sexp.t -> Import.string
pretty_string
needs to allocate. If you care about performance, using one of the pp_*
functions above is advised.
val sexp_to_string : Sexp_pretty.Import.Sexp.t -> Import.string
module Sexp_with_layout :
S with type sexp := Sexp_pretty.Import.Sexp.With_layout.t_or_comment
val command_main :
color:Import.bool ->
config_file:Import.string Import.option ->
drop_comments:Import.bool ->
interpret_atom_as_sexp:Import.bool ->
new_line_separator:Import.bool Import.option ->
print_settings:Import.bool ->
Import.unit
module Normalize : sig ... end
val sexp_to_sexp_or_comment :
Sexp_pretty.Import.Sexp.t ->
Sexp_pretty.Import.Sexp.With_layout.t_or_comment