diff --git a/dev/containers/CCSexp/Decoder/index.html b/dev/containers/CCSexp/Decoder/index.html index 116d1109..7cd15c09 100644 --- a/dev/containers/CCSexp/Decoder/index.html +++ b/dev/containers/CCSexp/Decoder/index.html @@ -1,2 +1,2 @@ -Decoder (containers.CCSexp.Decoder)

Module CCSexp.Decoder

type t

Decoder

val of_lexbuf : Stdlib.Lexing.lexbuf -> t
val next : t -> sexp parse_result

Parse the next S-expression or return an error if the input isn't long enough or isn't a proper S-expression.

val to_list : t -> sexp list CCSexp_intf.or_error

Read all the values from this decoder.

since
2.8
\ No newline at end of file +Decoder (containers.CCSexp.Decoder)

Module CCSexp.Decoder

type t

Decoder

val of_lexbuf : Stdlib.Lexing.lexbuf -> t
val next : t -> sexp parse_result

Parse the next S-expression or return an error if the input isn't long enough or isn't a proper S-expression.

val to_list : t -> sexp list CCSexp_intf.or_error

Read all the values from this decoder.

since
2.8
val last_loc : t -> loc option

Last location for the decoder. In particular, after calling next, this gives the location of the last token used in the result, which is useful in case of error.

since
NEXT_RELEASE
\ No newline at end of file diff --git a/dev/containers/CCSexp/Make/Decoder/index.html b/dev/containers/CCSexp/Make/Decoder/index.html index f39cfc20..39b3d921 100644 --- a/dev/containers/CCSexp/Make/Decoder/index.html +++ b/dev/containers/CCSexp/Make/Decoder/index.html @@ -1,2 +1,2 @@ -Decoder (containers.CCSexp.Make.Decoder)

Module Make.Decoder

type t

Decoder

val of_lexbuf : Stdlib.Lexing.lexbuf -> t
val next : t -> sexp parse_result

Parse the next S-expression or return an error if the input isn't long enough or isn't a proper S-expression.

val to_list : t -> sexp list CCSexp_intf.or_error

Read all the values from this decoder.

since
2.8
\ No newline at end of file +Decoder (containers.CCSexp.Make.Decoder)

Module Make.Decoder

type t

Decoder

val of_lexbuf : Stdlib.Lexing.lexbuf -> t
val next : t -> sexp parse_result

Parse the next S-expression or return an error if the input isn't long enough or isn't a proper S-expression.

val to_list : t -> sexp list CCSexp_intf.or_error

Read all the values from this decoder.

since
2.8
val last_loc : t -> loc option

Last location for the decoder. In particular, after calling next, this gives the location of the last token used in the result, which is useful in case of error.

since
NEXT_RELEASE
\ No newline at end of file diff --git a/dev/containers/CCSexp/Make/index.html b/dev/containers/CCSexp/Make/index.html index f076e161..6deec805 100644 --- a/dev/containers/CCSexp/Make/index.html +++ b/dev/containers/CCSexp/Make/index.html @@ -1,2 +1,2 @@ -Make (containers.CCSexp.Make)

Module CCSexp.Make

Functorized operations

This builds a parser and printer for S-expressions represented as in the Sexp argument.

since
2.7

Parameters

Signature

include CCSexp_intf.S0
type t
type sexp = t

Re-exports

val atom : string -> t

Make an atom out of this string.

since
2.8
val list : t list -> t

Make a Sexpr of this list.

since
2.8

Constructors

val of_int : int -> t
val of_bool : bool -> t
val of_list : t list -> t
val of_rev_list : t list -> t

Reverse the list.

val of_float : float -> t
val of_unit : t
val of_pair : (t * t) -> t
val of_triple : (t * t * t) -> t
val of_quad : (t * t * t * t) -> t
val of_variant : string -> t list -> t

of_variant name args is used to encode algebraic variants into a S-expr. For instance of_variant "some" [of_int 1] represents the value Some 1.

val of_field : string -> t -> t

Used to represent one record field.

val of_record : (string * t) list -> t

Represent a record by its named fields.

Printing

val to_buf : Stdlib.Buffer.t -> t -> unit
val to_string : t -> string
val to_file : string -> t -> unit
val to_file_iter : string -> t CCSexp_intf.iter -> unit

Print the given iter of expressions to a file.

val to_chan : Stdlib.out_channel -> t -> unit
val pp : Stdlib.Format.formatter -> t -> unit

Pretty-printer nice on human eyes (including indentation).

val pp_noindent : Stdlib.Format.formatter -> t -> unit

Raw, direct printing as compact as possible.

Parsing

val parse_string : string -> t CCSexp_intf.or_error

Parse a string.

val parse_string_list : string -> t list CCSexp_intf.or_error

Parse a string into a list of S-exprs.

since
2.8
val parse_chan : Stdlib.in_channel -> t CCSexp_intf.or_error

Parse a S-expression from the given channel. Can read more data than necessary, so don't use this if you need finer-grained control (e.g. to read something else after the S-exp).

val parse_chan_gen : Stdlib.in_channel -> t CCSexp_intf.or_error CCSexp_intf.gen

Parse a channel into a generator of S-expressions.

val parse_chan_list : Stdlib.in_channel -> t list CCSexp_intf.or_error
val parse_file : string -> t CCSexp_intf.or_error

Open the file and read a S-exp from it.

val parse_file_list : string -> t list CCSexp_intf.or_error

Open the file and read a S-exp from it.

Parsing

type 'a parse_result =
| Yield of 'a
| Fail of string
| End

A parser of 'a can return Yield x when it parsed a value, or Fail e when a parse error was encountered, or End if the input was empty.

module Decoder : sig ... end
\ No newline at end of file +Make (containers.CCSexp.Make)

Module CCSexp.Make

Functorized operations

This builds a parser and printer for S-expressions represented as in the Sexp argument.

since
2.7

Parameters

Signature

include CCSexp_intf.S0
type t
type sexp = t

Re-exports

val atom : string -> t

Make an atom out of this string.

since
2.8
val list : t list -> t

Make a Sexpr of this list.

since
2.8

Constructors

val of_int : int -> t
val of_bool : bool -> t
val of_list : t list -> t
val of_rev_list : t list -> t

Reverse the list.

val of_float : float -> t
val of_unit : t
val of_pair : (t * t) -> t
val of_triple : (t * t * t) -> t
val of_quad : (t * t * t * t) -> t
val of_variant : string -> t list -> t

of_variant name args is used to encode algebraic variants into a S-expr. For instance of_variant "some" [of_int 1] represents the value Some 1.

val of_field : string -> t -> t

Used to represent one record field.

val of_record : (string * t) list -> t

Represent a record by its named fields.

Printing

val to_buf : Stdlib.Buffer.t -> t -> unit
val to_string : t -> string
val to_file : string -> t -> unit
val to_file_iter : string -> t CCSexp_intf.iter -> unit

Print the given iter of expressions to a file.

val to_chan : Stdlib.out_channel -> t -> unit
val pp : Stdlib.Format.formatter -> t -> unit

Pretty-printer nice on human eyes (including indentation).

val pp_noindent : Stdlib.Format.formatter -> t -> unit

Raw, direct printing as compact as possible.

Parsing

val parse_string : string -> t CCSexp_intf.or_error

Parse a string.

val parse_string_list : string -> t list CCSexp_intf.or_error

Parse a string into a list of S-exprs.

since
2.8
val parse_chan : Stdlib.in_channel -> t CCSexp_intf.or_error

Parse a S-expression from the given channel. Can read more data than necessary, so don't use this if you need finer-grained control (e.g. to read something else after the S-exp).

val parse_chan_gen : Stdlib.in_channel -> t CCSexp_intf.or_error CCSexp_intf.gen

Parse a channel into a generator of S-expressions.

val parse_chan_list : Stdlib.in_channel -> t list CCSexp_intf.or_error
val parse_file : string -> t CCSexp_intf.or_error

Open the file and read a S-exp from it.

val parse_file_list : string -> t list CCSexp_intf.or_error

Open the file and read a S-exp from it.

type loc

Locations for the S-expressions.

since
NEXT_RELEASE

Parsing

type 'a parse_result =
| Yield of 'a
| Fail of string
| End

A parser of 'a can return Yield x when it parsed a value, or Fail e when a parse error was encountered, or End if the input was empty.

module Decoder : sig ... end
\ No newline at end of file diff --git a/dev/containers/CCSexp/index.html b/dev/containers/CCSexp/index.html index bcd7fb46..8ab61aa8 100644 --- a/dev/containers/CCSexp/index.html +++ b/dev/containers/CCSexp/index.html @@ -1,2 +1,2 @@ -CCSexp (containers.CCSexp)

Module CCSexp

Handling S-expressions

since
3.0 moved into containers-core, previously in [containers.sexp]
type 'a or_error = ('a, string) Stdlib.result
type 'a gen = unit -> 'a option
module type SEXP = CCSexp_intf.SEXP
module type S = CCSexp_intf.S
module Make : functor (Sexp : SEXP) -> S with type t = Sexp.t

Basics

type t = [
| `Atom of string
| `List of t list
]

A simple, structural representation of S-expressions.

include S with type S.t := t
include CCSexp_intf.S0
type t
type sexp = t

Re-exports

val atom : string -> t

Make an atom out of this string.

since
2.8
val list : t list -> t

Make a Sexpr of this list.

since
2.8

Constructors

val of_int : int -> t
val of_bool : bool -> t
val of_list : t list -> t
val of_rev_list : t list -> t

Reverse the list.

val of_float : float -> t
val of_unit : t
val of_pair : (t * t) -> t
val of_triple : (t * t * t) -> t
val of_quad : (t * t * t * t) -> t
val of_variant : string -> t list -> t

of_variant name args is used to encode algebraic variants into a S-expr. For instance of_variant "some" [of_int 1] represents the value Some 1.

val of_field : string -> t -> t

Used to represent one record field.

val of_record : (string * t) list -> t

Represent a record by its named fields.

Printing

val to_buf : Stdlib.Buffer.t -> t -> unit
val to_string : t -> string
val to_file : string -> t -> unit
val to_file_iter : string -> t CCSexp_intf.iter -> unit

Print the given iter of expressions to a file.

val to_chan : Stdlib.out_channel -> t -> unit
val pp : Stdlib.Format.formatter -> t -> unit

Pretty-printer nice on human eyes (including indentation).

val pp_noindent : Stdlib.Format.formatter -> t -> unit

Raw, direct printing as compact as possible.

Parsing

val parse_string : string -> t CCSexp_intf.or_error

Parse a string.

val parse_string_list : string -> t list CCSexp_intf.or_error

Parse a string into a list of S-exprs.

since
2.8
val parse_chan : Stdlib.in_channel -> t CCSexp_intf.or_error

Parse a S-expression from the given channel. Can read more data than necessary, so don't use this if you need finer-grained control (e.g. to read something else after the S-exp).

val parse_chan_gen : Stdlib.in_channel -> t CCSexp_intf.or_error CCSexp_intf.gen

Parse a channel into a generator of S-expressions.

val parse_chan_list : Stdlib.in_channel -> t list CCSexp_intf.or_error
val parse_file : string -> t CCSexp_intf.or_error

Open the file and read a S-exp from it.

val parse_file_list : string -> t list CCSexp_intf.or_error

Open the file and read a S-exp from it.

Parsing

type 'a parse_result =
| Yield of 'a
| Fail of string
| End

A parser of 'a can return Yield x when it parsed a value, or Fail e when a parse error was encountered, or End if the input was empty.

module Decoder : sig ... end
val equal : t -> t -> bool
since
3.0
val compare : t -> t -> int
since
3.0
val atom : string -> t

Build an atom directly from a string.

\ No newline at end of file +CCSexp (containers.CCSexp)

Module CCSexp

Handling S-expressions

since
3.0 moved into containers-core, previously in [containers.sexp]
type 'a or_error = ('a, string) Stdlib.result
type 'a gen = unit -> 'a option
module type SEXP = CCSexp_intf.SEXP
module type S = CCSexp_intf.S
module Make : functor (Sexp : SEXP) -> S with type t = Sexp.t

Basics

type t = [
| `Atom of string
| `List of t list
]

A simple, structural representation of S-expressions.

include S with type S.t := t
include CCSexp_intf.S0
type t
type sexp = t

Re-exports

val atom : string -> t

Make an atom out of this string.

since
2.8
val list : t list -> t

Make a Sexpr of this list.

since
2.8

Constructors

val of_int : int -> t
val of_bool : bool -> t
val of_list : t list -> t
val of_rev_list : t list -> t

Reverse the list.

val of_float : float -> t
val of_unit : t
val of_pair : (t * t) -> t
val of_triple : (t * t * t) -> t
val of_quad : (t * t * t * t) -> t
val of_variant : string -> t list -> t

of_variant name args is used to encode algebraic variants into a S-expr. For instance of_variant "some" [of_int 1] represents the value Some 1.

val of_field : string -> t -> t

Used to represent one record field.

val of_record : (string * t) list -> t

Represent a record by its named fields.

Printing

val to_buf : Stdlib.Buffer.t -> t -> unit
val to_string : t -> string
val to_file : string -> t -> unit
val to_file_iter : string -> t CCSexp_intf.iter -> unit

Print the given iter of expressions to a file.

val to_chan : Stdlib.out_channel -> t -> unit
val pp : Stdlib.Format.formatter -> t -> unit

Pretty-printer nice on human eyes (including indentation).

val pp_noindent : Stdlib.Format.formatter -> t -> unit

Raw, direct printing as compact as possible.

Parsing

val parse_string : string -> t CCSexp_intf.or_error

Parse a string.

val parse_string_list : string -> t list CCSexp_intf.or_error

Parse a string into a list of S-exprs.

since
2.8
val parse_chan : Stdlib.in_channel -> t CCSexp_intf.or_error

Parse a S-expression from the given channel. Can read more data than necessary, so don't use this if you need finer-grained control (e.g. to read something else after the S-exp).

val parse_chan_gen : Stdlib.in_channel -> t CCSexp_intf.or_error CCSexp_intf.gen

Parse a channel into a generator of S-expressions.

val parse_chan_list : Stdlib.in_channel -> t list CCSexp_intf.or_error
val parse_file : string -> t CCSexp_intf.or_error

Open the file and read a S-exp from it.

val parse_file_list : string -> t list CCSexp_intf.or_error

Open the file and read a S-exp from it.

type loc

Locations for the S-expressions.

since
NEXT_RELEASE

Parsing

type 'a parse_result =
| Yield of 'a
| Fail of string
| End

A parser of 'a can return Yield x when it parsed a value, or Fail e when a parse error was encountered, or End if the input was empty.

module Decoder : sig ... end
val equal : t -> t -> bool
since
3.0
val compare : t -> t -> int
since
3.0
val atom : string -> t

Build an atom directly from a string.

\ No newline at end of file diff --git a/dev/containers/CCSexp/module-type-S/Decoder/index.html b/dev/containers/CCSexp/module-type-S/Decoder/index.html index 84b0757a..f7ad3975 100644 --- a/dev/containers/CCSexp/module-type-S/Decoder/index.html +++ b/dev/containers/CCSexp/module-type-S/Decoder/index.html @@ -1,2 +1,2 @@ -Decoder (containers.CCSexp.S.Decoder)

Module S.Decoder

type t

Decoder

val of_lexbuf : Stdlib.Lexing.lexbuf -> t
val next : t -> sexp parse_result

Parse the next S-expression or return an error if the input isn't long enough or isn't a proper S-expression.

val to_list : t -> sexp list CCSexp_intf.or_error

Read all the values from this decoder.

since
2.8
\ No newline at end of file +Decoder (containers.CCSexp.S.Decoder)

Module S.Decoder

type t

Decoder

val of_lexbuf : Stdlib.Lexing.lexbuf -> t
val next : t -> sexp parse_result

Parse the next S-expression or return an error if the input isn't long enough or isn't a proper S-expression.

val to_list : t -> sexp list CCSexp_intf.or_error

Read all the values from this decoder.

since
2.8
val last_loc : t -> loc option

Last location for the decoder. In particular, after calling next, this gives the location of the last token used in the result, which is useful in case of error.

since
NEXT_RELEASE
\ No newline at end of file diff --git a/dev/containers/CCSexp/module-type-S/index.html b/dev/containers/CCSexp/module-type-S/index.html index 7abea849..2b363e8d 100644 --- a/dev/containers/CCSexp/module-type-S/index.html +++ b/dev/containers/CCSexp/module-type-S/index.html @@ -1,2 +1,2 @@ -S (containers.CCSexp.S)

Module type CCSexp.S

Operations over S-expressions

since
2.7
include CCSexp_intf.S0
type t
type sexp = t

Re-exports

val atom : string -> t

Make an atom out of this string.

since
2.8
val list : t list -> t

Make a Sexpr of this list.

since
2.8

Constructors

val of_int : int -> t
val of_bool : bool -> t
val of_list : t list -> t
val of_rev_list : t list -> t

Reverse the list.

val of_float : float -> t
val of_unit : t
val of_pair : (t * t) -> t
val of_triple : (t * t * t) -> t
val of_quad : (t * t * t * t) -> t
val of_variant : string -> t list -> t

of_variant name args is used to encode algebraic variants into a S-expr. For instance of_variant "some" [of_int 1] represents the value Some 1.

val of_field : string -> t -> t

Used to represent one record field.

val of_record : (string * t) list -> t

Represent a record by its named fields.

Printing

val to_buf : Stdlib.Buffer.t -> t -> unit
val to_string : t -> string
val to_file : string -> t -> unit
val to_file_iter : string -> t CCSexp_intf.iter -> unit

Print the given iter of expressions to a file.

val to_chan : Stdlib.out_channel -> t -> unit
val pp : Stdlib.Format.formatter -> t -> unit

Pretty-printer nice on human eyes (including indentation).

val pp_noindent : Stdlib.Format.formatter -> t -> unit

Raw, direct printing as compact as possible.

Parsing

val parse_string : string -> t CCSexp_intf.or_error

Parse a string.

val parse_string_list : string -> t list CCSexp_intf.or_error

Parse a string into a list of S-exprs.

since
2.8
val parse_chan : Stdlib.in_channel -> t CCSexp_intf.or_error

Parse a S-expression from the given channel. Can read more data than necessary, so don't use this if you need finer-grained control (e.g. to read something else after the S-exp).

val parse_chan_gen : Stdlib.in_channel -> t CCSexp_intf.or_error CCSexp_intf.gen

Parse a channel into a generator of S-expressions.

val parse_chan_list : Stdlib.in_channel -> t list CCSexp_intf.or_error
val parse_file : string -> t CCSexp_intf.or_error

Open the file and read a S-exp from it.

val parse_file_list : string -> t list CCSexp_intf.or_error

Open the file and read a S-exp from it.

Parsing

type 'a parse_result =
| Yield of 'a
| Fail of string
| End

A parser of 'a can return Yield x when it parsed a value, or Fail e when a parse error was encountered, or End if the input was empty.

module Decoder : sig ... end
\ No newline at end of file +S (containers.CCSexp.S)

Module type CCSexp.S

Operations over S-expressions

since
2.7
include CCSexp_intf.S0
type t
type sexp = t

Re-exports

val atom : string -> t

Make an atom out of this string.

since
2.8
val list : t list -> t

Make a Sexpr of this list.

since
2.8

Constructors

val of_int : int -> t
val of_bool : bool -> t
val of_list : t list -> t
val of_rev_list : t list -> t

Reverse the list.

val of_float : float -> t
val of_unit : t
val of_pair : (t * t) -> t
val of_triple : (t * t * t) -> t
val of_quad : (t * t * t * t) -> t
val of_variant : string -> t list -> t

of_variant name args is used to encode algebraic variants into a S-expr. For instance of_variant "some" [of_int 1] represents the value Some 1.

val of_field : string -> t -> t

Used to represent one record field.

val of_record : (string * t) list -> t

Represent a record by its named fields.

Printing

val to_buf : Stdlib.Buffer.t -> t -> unit
val to_string : t -> string
val to_file : string -> t -> unit
val to_file_iter : string -> t CCSexp_intf.iter -> unit

Print the given iter of expressions to a file.

val to_chan : Stdlib.out_channel -> t -> unit
val pp : Stdlib.Format.formatter -> t -> unit

Pretty-printer nice on human eyes (including indentation).

val pp_noindent : Stdlib.Format.formatter -> t -> unit

Raw, direct printing as compact as possible.

Parsing

val parse_string : string -> t CCSexp_intf.or_error

Parse a string.

val parse_string_list : string -> t list CCSexp_intf.or_error

Parse a string into a list of S-exprs.

since
2.8
val parse_chan : Stdlib.in_channel -> t CCSexp_intf.or_error

Parse a S-expression from the given channel. Can read more data than necessary, so don't use this if you need finer-grained control (e.g. to read something else after the S-exp).

val parse_chan_gen : Stdlib.in_channel -> t CCSexp_intf.or_error CCSexp_intf.gen

Parse a channel into a generator of S-expressions.

val parse_chan_list : Stdlib.in_channel -> t list CCSexp_intf.or_error
val parse_file : string -> t CCSexp_intf.or_error

Open the file and read a S-exp from it.

val parse_file_list : string -> t list CCSexp_intf.or_error

Open the file and read a S-exp from it.

type loc

Locations for the S-expressions.

since
NEXT_RELEASE

Parsing

type 'a parse_result =
| Yield of 'a
| Fail of string
| End

A parser of 'a can return Yield x when it parsed a value, or Fail e when a parse error was encountered, or End if the input was empty.

module Decoder : sig ... end
\ No newline at end of file diff --git a/dev/containers/CCSexp_intf/module-type-S/Decoder/index.html b/dev/containers/CCSexp_intf/module-type-S/Decoder/index.html index 63687db3..9fce6232 100644 --- a/dev/containers/CCSexp_intf/module-type-S/Decoder/index.html +++ b/dev/containers/CCSexp_intf/module-type-S/Decoder/index.html @@ -1,2 +1,2 @@ -Decoder (containers.CCSexp_intf.S.Decoder)

Module S.Decoder

type t

Decoder

val of_lexbuf : Stdlib.Lexing.lexbuf -> t
val next : t -> sexp parse_result

Parse the next S-expression or return an error if the input isn't long enough or isn't a proper S-expression.

val to_list : t -> sexp list or_error

Read all the values from this decoder.

since
2.8
\ No newline at end of file +Decoder (containers.CCSexp_intf.S.Decoder)

Module S.Decoder

type t

Decoder

val of_lexbuf : Stdlib.Lexing.lexbuf -> t
val next : t -> sexp parse_result

Parse the next S-expression or return an error if the input isn't long enough or isn't a proper S-expression.

val to_list : t -> sexp list or_error

Read all the values from this decoder.

since
2.8
val last_loc : t -> loc option

Last location for the decoder. In particular, after calling next, this gives the location of the last token used in the result, which is useful in case of error.

since
NEXT_RELEASE
\ No newline at end of file diff --git a/dev/containers/CCSexp_intf/module-type-S/index.html b/dev/containers/CCSexp_intf/module-type-S/index.html index d4e4bbf4..d7447e76 100644 --- a/dev/containers/CCSexp_intf/module-type-S/index.html +++ b/dev/containers/CCSexp_intf/module-type-S/index.html @@ -1,2 +1,2 @@ -S (containers.CCSexp_intf.S)

Module type CCSexp_intf.S

Operations over S-expressions (extended)

since
2.7
include S0
type t
type sexp = t

Re-exports

val atom : string -> t

Make an atom out of this string.

since
2.8
val list : t list -> t

Make a Sexpr of this list.

since
2.8

Constructors

val of_int : int -> t
val of_bool : bool -> t
val of_list : t list -> t
val of_rev_list : t list -> t

Reverse the list.

val of_float : float -> t
val of_unit : t
val of_pair : (t * t) -> t
val of_triple : (t * t * t) -> t
val of_quad : (t * t * t * t) -> t
val of_variant : string -> t list -> t

of_variant name args is used to encode algebraic variants into a S-expr. For instance of_variant "some" [of_int 1] represents the value Some 1.

val of_field : string -> t -> t

Used to represent one record field.

val of_record : (string * t) list -> t

Represent a record by its named fields.

Printing

val to_buf : Stdlib.Buffer.t -> t -> unit
val to_string : t -> string
val to_file : string -> t -> unit
val to_file_iter : string -> t iter -> unit

Print the given iter of expressions to a file.

val to_chan : Stdlib.out_channel -> t -> unit
val pp : Stdlib.Format.formatter -> t -> unit

Pretty-printer nice on human eyes (including indentation).

val pp_noindent : Stdlib.Format.formatter -> t -> unit

Raw, direct printing as compact as possible.

Parsing

val parse_string : string -> t or_error

Parse a string.

val parse_string_list : string -> t list or_error

Parse a string into a list of S-exprs.

since
2.8
val parse_chan : Stdlib.in_channel -> t or_error

Parse a S-expression from the given channel. Can read more data than necessary, so don't use this if you need finer-grained control (e.g. to read something else after the S-exp).

val parse_chan_gen : Stdlib.in_channel -> t or_error gen

Parse a channel into a generator of S-expressions.

val parse_chan_list : Stdlib.in_channel -> t list or_error
val parse_file : string -> t or_error

Open the file and read a S-exp from it.

val parse_file_list : string -> t list or_error

Open the file and read a S-exp from it.

Parsing

type 'a parse_result =
| Yield of 'a
| Fail of string
| End

A parser of 'a can return Yield x when it parsed a value, or Fail e when a parse error was encountered, or End if the input was empty.

module Decoder : sig ... end
\ No newline at end of file +S (containers.CCSexp_intf.S)

Module type CCSexp_intf.S

Operations over S-expressions (extended)

since
2.7
include S0
type t
type sexp = t

Re-exports

val atom : string -> t

Make an atom out of this string.

since
2.8
val list : t list -> t

Make a Sexpr of this list.

since
2.8

Constructors

val of_int : int -> t
val of_bool : bool -> t
val of_list : t list -> t
val of_rev_list : t list -> t

Reverse the list.

val of_float : float -> t
val of_unit : t
val of_pair : (t * t) -> t
val of_triple : (t * t * t) -> t
val of_quad : (t * t * t * t) -> t
val of_variant : string -> t list -> t

of_variant name args is used to encode algebraic variants into a S-expr. For instance of_variant "some" [of_int 1] represents the value Some 1.

val of_field : string -> t -> t

Used to represent one record field.

val of_record : (string * t) list -> t

Represent a record by its named fields.

Printing

val to_buf : Stdlib.Buffer.t -> t -> unit
val to_string : t -> string
val to_file : string -> t -> unit
val to_file_iter : string -> t iter -> unit

Print the given iter of expressions to a file.

val to_chan : Stdlib.out_channel -> t -> unit
val pp : Stdlib.Format.formatter -> t -> unit

Pretty-printer nice on human eyes (including indentation).

val pp_noindent : Stdlib.Format.formatter -> t -> unit

Raw, direct printing as compact as possible.

Parsing

val parse_string : string -> t or_error

Parse a string.

val parse_string_list : string -> t list or_error

Parse a string into a list of S-exprs.

since
2.8
val parse_chan : Stdlib.in_channel -> t or_error

Parse a S-expression from the given channel. Can read more data than necessary, so don't use this if you need finer-grained control (e.g. to read something else after the S-exp).

val parse_chan_gen : Stdlib.in_channel -> t or_error gen

Parse a channel into a generator of S-expressions.

val parse_chan_list : Stdlib.in_channel -> t list or_error
val parse_file : string -> t or_error

Open the file and read a S-exp from it.

val parse_file_list : string -> t list or_error

Open the file and read a S-exp from it.

type loc

Locations for the S-expressions.

since
NEXT_RELEASE

Parsing

type 'a parse_result =
| Yield of 'a
| Fail of string
| End

A parser of 'a can return Yield x when it parsed a value, or Fail e when a parse error was encountered, or End if the input was empty.

module Decoder : sig ... end
\ No newline at end of file