Module B00_serialk_sexp.Sexpq

type path = (Sexp.index * Sexp.loc) list
val pp_path : ?pp_loc:Sexp.loc Sexp.fmt -> ?pp_key:string Sexp.fmt -> unit -> path Sexp.fmt
type error_kind = [
  1. | `Key_unbound of string * string list
  2. | `Msg of string
  3. | `Nth_unbound of int * int
  4. | `Out_of_dom of string * string * string list
]
val pp_error_kind : ?pp_em:string Sexp.fmt -> ?pp_key:string Sexp.fmt -> unit -> error_kind Sexp.fmt
type error = error_kind * (path * Sexp.loc)
val pp_error : ?pp_loc:Sexp.loc Sexp.fmt -> ?pp_path:path Sexp.fmt -> ?pp_error_kind:error_kind Sexp.fmt -> ?pp_prefix:unit Sexp.fmt -> unit -> error Sexp.fmt
val error_to_string : ?pp_error:error Sexp.fmt -> ('a, error) result -> ('a, string) result
type 'a t
val query : 'a t -> Sexp.t -> ('a, error) result
val query_at_path : 'a t -> (Sexp.t * path) -> ('a, error) result
val query' : ?pp_error:error Sexp.fmt -> 'a t -> Sexp.t -> ('a, string) result
val succeed : 'a -> 'a t
val fail : error_kind -> 'a t
val failf : ('a, Format.formatter, unit, 'b t) format4 -> 'a
val app : ('a -> 'b) t -> 'a t -> 'b t
val ($) : ('a -> 'b) t -> 'a t -> 'b t
val pair : 'a t -> 'b t -> ('a * 'b) t
val bind : 'a t -> ('a -> 'b t) -> 'b t
val map : ('a -> 'b) -> 'a t -> 'b t
val some : 'a t -> 'a option t
val loc : 'a t -> ('a * (path * Sexp.loc)) t
val fold : atom:'a t -> list:'a t -> 'a t
val sexp : Sexp.t t
val sexp_with_path : (Sexp.t * path) t
val atom : string t
val atom_to : kind:string -> (string -> ('a, string) result) -> 'a t
val enum : kind:string -> Set.Make(String).t -> string t
val enum_map : kind:string -> 'a Map.Make(String).t -> 'a t
val bool : bool t
val int : int t
val int32 : int32 t
val int64 : int64 t
val float : float t
val is_empty : bool t
val hd : 'a t -> 'a t
val tl : 'a t -> 'a t
val fold_list : ('a -> 'b -> 'b) -> 'a t -> 'b -> 'b t
val list : 'a t -> 'a list t
val nth : ?absent:'a -> int -> 'a t -> 'a t
val delete_nth : must_exist:bool -> int -> Sexp.t t
val key : ?absent:'a -> string -> 'a t -> 'a t
val delete_key : must_exist:bool -> string -> Sexp.t t
val key_dom : validate:Set.Make(String).t option -> Set.Make(String).t t
val atomic : 'a t -> 'a t
val index : ?absent:'a -> Sexp.index -> 'a t -> 'a t
val delete_index : must_exist:bool -> Sexp.index -> Sexp.t t
val path : ?absent:'a -> Sexp.path -> 'a t -> 'a t
val probe_path : Sexp.path -> (path * Sexp.t * Sexp.path) t
val delete_at_path : must_exist:bool -> Sexp.path -> Sexp.t t
val splice_at_path : ?stub:Sexp.t -> must_exist:bool -> Sexp.path -> rep:Sexp.t -> Sexp.t t
val splice_at_caret : ?stub:Sexp.t -> must_exist:bool -> Sexp.caret -> rep:Sexp.t -> Sexp.t t
val option : 'a t -> 'a option t