: Parse_pos.t | ; | ||||
: 't | ; | ||||
: Buffer.t | ; |
no_raise
is the identity, but by using 'a no_raise
in a sexpable type, the
resulting use sexp_of_no_raise
protects the conversion of 'a
to a sexp so that if
it fails, one gets a sexp with an error message about the failure, rather than an
exception being raised.
WARNING: The resulting no_raise_of_sexp
can still raise.
With_text.t
is a value paired with the full textual representation of its sexp.
This is useful for dealing with the case where you want to keep track of a value along
with the format of the s-expression it was generated from, which allows you to
maintain formatting details, comments, etc.
The ocaml pretty printer (used by sexplib) is a speed daemon but is, sadly enough, produces wrong output (e.g it overflows in places where this could have avoided). This uses a printer from wadler's a prettier printer to output strings suited to human consumption.
A more readable but less compact pretty printer than the one bundled by sexplib. This is going through a test period at which point it might make it in sexplib. It uses ocaml's pretty-printing library so it is both fast and broken.
Takes a string and returns the same string but commented according to sexp's syntax
Returns a smaller sexp by replacing sections with "...". Will try to show parts of the sexp "near" sub_sexp.
Limiting size to length a string length is less efficient than a certain depth. The meaning of a given depth is arbitrary except that more depth gives you a bigger sexp. Try 100 or so.