3 @@ -32,7 +32,6 @@ bug-reports: "https://github.com/ocaml-d
9 dev-repo: "git+https://github.com/ocaml-dune/csexp.git"
13 @@ -102,12 +102,6 @@ end
14 module Make (Sexp : Sexp) = struct
17 - (* This is to keep compatibility with 4.02 without writing [Result.]
19 - type ('a, 'b) result = ('a, 'b) Result.result =
23 module Parser = struct
24 exception Parse_error of string
26 @@ -370,9 +364,9 @@ module Make (Sexp : Sexp) = struct
30 - val read_string : t -> int -> (string, string) Result.t Monad.t
31 + val read_string : t -> int -> (string, string) result Monad.t
33 - val read_char : t -> (char, string) Result.t Monad.t
34 + val read_char : t -> (char, string) result Monad.t
37 module Make_parser (Input : Input) = struct
40 @@ -34,24 +34,24 @@ module type S = sig
41 [s]. It is an error for [s] to contain a S-expression followed by more
42 data. In case of error, the offset of the error as well as an error
43 message is returned. *)
44 - val parse_string : string -> (sexp, int * string) Result.t
45 + val parse_string : string -> (sexp, int * string) result
47 (** [parse_string s] parses a sequence of S-expressions encoded in canonical
49 - val parse_string_many : string -> (sexp list, int * string) Result.t
50 + val parse_string_many : string -> (sexp list, int * string) result
52 (** Read exactly one canonical S-expressions from the given channel. Note that
53 this function never raises [End_of_file]. Instead, it returns [Error]. *)
54 - val input : in_channel -> (sexp, string) Result.t
55 + val input : in_channel -> (sexp, string) result
57 (** Same as [input] but returns [Ok None] if the end of file has already been
58 reached. If some more characters are available but the end of file is
59 reached before reading a complete S-expression, this function returns
61 - val input_opt : in_channel -> (sexp option, string) Result.t
62 + val input_opt : in_channel -> (sexp option, string) result
64 (** Read many S-expressions until the end of input is reached. *)
65 - val input_many : in_channel -> (sexp list, string) Result.t
66 + val input_many : in_channel -> (sexp list, string) result
68 (** {2 Serialising} *)
70 @@ -353,18 +353,18 @@ module type S = sig
71 val bind : 'a t -> ('a -> 'b t) -> 'b t
74 - val read_string : t -> int -> (string, string) Result.t Monad.t
75 + val read_string : t -> int -> (string, string) result Monad.t
77 - val read_char : t -> (char, string) Result.t Monad.t
78 + val read_char : t -> (char, string) result Monad.t
80 [@@deprecated "Use Parser module instead"]
84 module Make_parser (Input : Input) : sig
85 - val parse : Input.t -> (sexp, string) Result.t Input.Monad.t
86 + val parse : Input.t -> (sexp, string) result Input.Monad.t
88 - val parse_many : Input.t -> (sexp list, string) Result.t Input.Monad.t
89 + val parse_many : Input.t -> (sexp list, string) result Input.Monad.t
91 [@@deprecated "Use Parser module instead"]