package dune-private-libs
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=8f77d3a87f208e0d7cccaa1c48c4bb1bb87d62d07c3f25e9b8ba298e028ce52b
sha512=f209f12ced10c1abf8782bdb0143f4cec77795f7174d2cc75130afb1e01550b01f2f77b9e3ec4888efdad83d2f9878d179b39126f824f4e522f3ef4da34bf27e
doc/dune-private-libs.dune_csexp/Dune_csexp/Csexp/Make/index.html
Module Csexp.Make
Parameters
Signature
Parsing
parse_string s
parses a single S-expression encoded in canonical form in s
. It is an error for s
to contain a S-expression followed by more data. In case of error, the offset of the error as well as an error message is returned.
parse_string s
parses a sequence of S-expressions encoded in canonical form in s
val input : in_channel -> (Sexp.t, string) result
Read exactly one canonical S-expressions from the given channel. Note that this function never raises End_of_file
. Instead, it returns Error
.
val input_opt : in_channel -> (Sexp.t option, string) result
Same as input
but returns Ok None
if the end of file has already been reached. If some more characters are available but the end of file is reached before reading a complete S-expression, this function returns Error
.
val input_many : in_channel -> (Sexp.t list, string) result
Read many S-expressions until the end of input is reached.
Serialising
val serialised_length : Sexp.t -> int
The length of the serialised representation of a S-expression
val to_string : Sexp.t -> string
to_string sexp
converts S-expression sexp
to a string in canonical form.
to_buffer buf sexp
outputs the S-expression sexp
converted to its canonical form to buffer buf
.
val to_channel : out_channel -> Sexp.t -> unit
output oc sexp
outputs the S-expression sexp
converted to its canonical form to channel oc
.