ocaml-containers/src/sexp/CCSexp.mli
2019-11-13 15:30:11 -06:00

38 lines
871 B
OCaml

(* This file is free software, part of containers. See file "license" for more details. *)
(** {1 Handling S-expressions} *)
type 'a or_error = ('a, string) Result.result
type 'a sequence = ('a -> unit) -> unit
type 'a gen = unit -> 'a option
(** {2 Abstract representation of S-expressions}
@since 2.7 *)
module type SEXP = CCSexp_intf.SEXP
(** {2 Operations over S-expressions}
@since 2.7 *)
module type S = CCSexp_intf.S
(** {2 Functorized operations}
This builds a parser and printer for S-expressions represented as
in the [Sexp] argument.
@since 2.7 *)
module Make(Sexp : SEXP) : S with type t = Sexp.t
(** {2 Basics} *)
(** A simple, structural representation of S-expressions. *)
type t = [
| `Atom of string
| `List of t list
]
include S with type t := t
val atom : string -> t
(** Build an atom directly from a string. *)