Serialkit_sexp.Sexpg
S-expression generation.
val atom : string -> t
atom s
is s
as an atom.
val ls : lyst
ls
starts a list.
el cond v l
is el (v ()) l
if cond
is true
and l
otherwise.
val atomf : ('a, Stdlib.Format.formatter, unit, t) Stdlib.format4 -> 'a
atomf fmt ...
is an atom formatted according to fmt
.
val bool : bool -> t
bool b
is atomf "%b" b
.
val int : int -> t
int i
is atomf "%d" i
.
val float : float -> t
float f
is atomf "%g" f
.
val float_hex : float -> t
float_hex f
is atomf "%h" f
.
option some o
is o
as the none
atom if o
is none
and a list starting with some
atom followed by some v
if o
is Some v
.
val buffer_add : Stdlib.Buffer.t -> t -> unit
buffer_add b g
adds the generated s-expression value g
to b
.
val to_string : t -> string
to_string g
is the generated s-expression value g
as a string.