]> git.pld-linux.org Git - packages/ocaml-csexp.git/blame_incremental - ocaml-csexp-result.patch
- new
[packages/ocaml-csexp.git] / ocaml-csexp-result.patch
... / ...
CommitLineData
1--- a/csexp.opam
2+++ b/csexp.opam
3@@ -32,7 +32,6 @@ bug-reports: "https://github.com/ocaml-d
4 depends: [
5 "dune" {>= "1.11"}
6 "ocaml" {>= "4.02.3"}
7- "result" {>= "1.5"}
8 ]
9 dev-repo: "git+https://github.com/ocaml-dune/csexp.git"
10 build: [
11--- a/src/csexp.ml
12+++ b/src/csexp.ml
13@@ -102,12 +102,6 @@ end
14 module Make (Sexp : Sexp) = struct
15 open Sexp
16
17- (* This is to keep compatibility with 4.02 without writing [Result.]
18- everywhere *)
19- type ('a, 'b) result = ('a, 'b) Result.result =
20- | Ok of 'a
21- | Error of 'b
22-
23 module Parser = struct
24 exception Parse_error of string
25
26@@ -370,9 +364,9 @@ module Make (Sexp : Sexp) = struct
27
28 module Monad : Monad
29
30- val read_string : t -> int -> (string, string) Result.t Monad.t
31+ val read_string : t -> int -> (string, string) result Monad.t
32
33- val read_char : t -> (char, string) Result.t Monad.t
34+ val read_char : t -> (char, string) result Monad.t
35 end
36
37 module Make_parser (Input : Input) = struct
38--- a/src/csexp.mli
39+++ b/src/csexp.mli
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
46
47 (** [parse_string s] parses a sequence of S-expressions encoded in canonical
48 form in [s] *)
49- val parse_string_many : string -> (sexp list, int * string) Result.t
50+ val parse_string_many : string -> (sexp list, int * string) result
51
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
56
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
60 [Error]. *)
61- val input_opt : in_channel -> (sexp option, string) Result.t
62+ val input_opt : in_channel -> (sexp option, string) result
63
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
67
68 (** {2 Serialising} *)
69
70@@ -353,18 +353,18 @@ module type S = sig
71 val bind : 'a t -> ('a -> 'b t) -> 'b t
72 end
73
74- val read_string : t -> int -> (string, string) Result.t Monad.t
75+ val read_string : t -> int -> (string, string) result Monad.t
76
77- val read_char : t -> (char, string) Result.t Monad.t
78+ val read_char : t -> (char, string) result Monad.t
79 end
80 [@@deprecated "Use Parser module instead"]
81
82 [@@@warning "-3"]
83
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
87
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
90 end
91 [@@deprecated "Use Parser module instead"]
92 end
This page took 0.085467 seconds and 4 git commands to generate.