Module Parsexp.Conv_single

type 'a single_or_many = 'a
module Parse_error : sig ... end
module Of_sexp_error : sig ... end
module Conv_error : sig ... end
val parse_string : string ‑> (Parsexp__.Import.Ppx_sexp_conv_lib.Sexp.t ‑> 'a) ‑> ('a single_or_manyConv_error.t) Pervasives.result
val parse_string_exn : string ‑> (Parsexp__.Import.Ppx_sexp_conv_lib.Sexp.t ‑> 'a) ‑> 'a single_or_many
val conv : (Parsexp__.Import.Ppx_sexp_conv_lib.Sexp.t single_or_many * Positions.t) ‑> (Parsexp__.Import.Ppx_sexp_conv_lib.Sexp.t ‑> 'a) ‑> ('a single_or_manyOf_sexp_error.t) Pervasives.result
val conv_exn : (Parsexp__.Import.Ppx_sexp_conv_lib.Sexp.t single_or_many * Positions.t) ‑> (Parsexp__.Import.Ppx_sexp_conv_lib.Sexp.t ‑> 'a) ‑> 'a single_or_many
val conv_combine : (Parsexp__.Import.Ppx_sexp_conv_lib.Sexp.t single_or_many * Positions.tParse_error.t) Pervasives.result ‑> (Parsexp__.Import.Ppx_sexp_conv_lib.Sexp.t ‑> 'a) ‑> ('a single_or_manyConv_error.t) Pervasives.result

Convenience function for merging parsing and conversion errors.

For instance if you have a load function as follow:

        val load : string -> (Sexp.t list * Positions.t, Parse_error.t) result

then you can create a load_conv function as follow:

        let load_conv : string -> (Sexp.t -> 'a) -> ('a list, Conv_error.t) result
          = fun filename f -> conv_combine (load filename) f