include sig ... endval color_of_sexp : Sexplib.Sexp.t ‑> colorval sexp_of_color : color ‑> Sexplib.Sexp.tinclude sig ... endval atom_threshold_of_sexp : Sexplib.Sexp.t ‑> atom_thresholdval sexp_of_atom_threshold : atom_threshold ‑> Sexplib.Sexp.tinclude sig ... endval char_threshold_of_sexp : Sexplib.Sexp.t ‑> char_thresholdval sexp_of_char_threshold : char_threshold ‑> Sexplib.Sexp.tDepth is the depth of an atom. For example, in (a (b (c) d)), the depth of a is 1, the depth of b and d is 2, and depth of c is 3. Depth_threshold usually refers to the maximum depth of any atom in a list for it to be considered for certain heuristic, e.g. data alignment.
include sig ... endval depth_threshold_of_sexp : Sexplib.Sexp.t ‑> depth_thresholdval sexp_of_depth_threshold : depth_threshold ‑> Sexplib.Sexp.tinclude sig ... endval aligned_parens_of_sexp : Sexplib.Sexp.t ‑> aligned_parensval sexp_of_aligned_parens : aligned_parens ‑> Sexplib.Sexp.ttype data_alignment = | Data_not_aligned | |
| Data_aligned of aligned_parens * atom_threshold * char_threshold * depth_threshold | (** Character threshold is excluding spaces and parentheses, the maximum depth can't exceed the depth threshold. *) |
include sig ... endval data_alignment_of_sexp : Sexplib.Sexp.t ‑> data_alignmentval sexp_of_data_alignment : data_alignment ‑> Sexplib.Sexp.tinclude sig ... endval atom_coloring_of_sexp : Sexplib.Sexp.t ‑> atom_coloringval sexp_of_atom_coloring : atom_coloring ‑> Sexplib.Sexp.tThis currently relates only to block comments. Auto_indent tries to infer the
indentation from the original formatting, Indent_comment n indents new lines in a
block comment by n spaces.
include sig ... endval comment_indent_of_sexp : Sexplib.Sexp.t ‑> comment_indentval sexp_of_comment_indent : comment_indent ‑> Sexplib.Sexp.tinclude sig ... endval comment_print_style_of_sexp : Sexplib.Sexp.t ‑> comment_print_styleval sexp_of_comment_print_style : comment_print_style ‑> Sexplib.Sexp.tinclude sig ... endval comments_of_sexp : Sexplib.Sexp.t ‑> commentsval sexp_of_comments : comments ‑> Sexplib.Sexp.tinclude sig ... endval atom_printing_of_sexp : Sexplib.Sexp.t ‑> atom_printingval sexp_of_atom_printing : atom_printing ‑> Sexplib.Sexp.tSingleton_lists are lists of the following format
(ATOM_1 .. ATOM_N (....))
and are printed in the following way if they are too big to fit on a line/force a breakline for other reasons:
(ATOM_1 .. ATOM_N ( .... ))
Thresholds correspond to what's an acceptable number/size of the leading atoms ATOM_1 through ATOM_N.
Character threshold is excluding spaces.
include sig ... endval singleton_limit_of_sexp : Sexplib.Sexp.t ‑> singleton_limitval sexp_of_singleton_limit : singleton_limit ‑> Sexplib.Sexp.tinclude sig ... endval paren_coloring_of_sexp : Sexplib.Sexp.t ‑> paren_coloringval sexp_of_paren_coloring : paren_coloring ‑> Sexplib.Sexp.tinclude sig ... endval separator_of_sexp : Sexplib.Sexp.t ‑> separatorval sexp_of_separator : separator ‑> Sexplib.Sexp.tShould closing parentheses be on the same line as the last sexp in the list (modulo comments), or should they be on new lines? Should opening parentheses always be on the same line as what follows them, or should they sometimes (when the first item in the list is a list followed by some other sexp) be on a separate line?
include sig ... endval parens_of_sexp : Sexplib.Sexp.t ‑> parensval sexp_of_parens : parens ‑> Sexplib.Sexp.ttype t = {indent : int; |
data_alignment : data_alignment; |
color_scheme : color array; |
atom_coloring : atom_coloring; |
atom_printing : atom_printing; |
paren_coloring : paren_coloring; |
opening_parens : parens; |
closing_parens : parens; |
comments : comments; |
singleton_limit : singleton_limit; |
leading_threshold : atom_threshold * char_threshold; |
separator : separator; |
sticky_comments : bool; |
}val default : tval create : ?color:bool ‑> ?interpret_atom_as_sexp:bool ‑> ?drop_comments:bool ‑> ?new_line_separator:bool ‑> ?custom_data_alignment:data_alignment ‑> unit ‑> tval update : ?color:bool ‑> ?interpret_atom_as_sexp:bool ‑> ?drop_comments:bool ‑> ?new_line_separator:bool ‑> ?custom_data_alignment:data_alignment ‑> t ‑> t