`sig
type ('ok, 'err) t = Ok of 'ok | Error of 'err
val ( >>= ) : ('a, 'e) t -> ('a -> ('b, 'e) t) -> ('b, 'e) t
val ( >>| ) : ('a, 'e) t -> ('a -> 'b) -> ('b, 'e) t
module Monad_infix :
sig
val ( >>= ) : ('a, 'e) t -> ('a -> ('b, 'e) t) -> ('b, 'e) t
val ( >>| ) : ('a, 'e) t -> ('a -> 'b) -> ('b, 'e) t
end
val bind : ('a, 'e) t -> ('a -> ('b, 'e) t) -> ('b, 'e) t
val return : 'a -> ('a, 'b) t
val join : (('a, 'e) t, 'e) t -> ('a, 'e) t
val ignore_m : ('a, 'e) t -> (unit, 'e) t
val all : ('a, 'e) t list -> ('a list, 'e) t
val all_ignore : (unit, 'e) t list -> (unit, 'e) t
val ignore : ('a, 'err) Result.t -> (unit, 'err) Result.t
val fail : 'err -> ('a, 'err) Result.t
val failf :
('a, unit, string, ('b, string) Result.t) Pervasives.format4 -> 'a
val is_ok : ('a, 'b) Result.t -> bool
val is_error : ('a, 'b) Result.t -> bool
val ok : ('ok, 'a) Result.t -> 'ok option
val error : ('a, 'err) Result.t -> 'err option
val of_option : 'ok option -> error:'err -> ('ok, 'err) Result.t
val iter : ('ok, 'a) Result.t -> f:('ok -> unit) -> unit
val iter_error : ('a, 'err) Result.t -> f:('err -> unit) -> unit
val map : ('ok, 'err) Result.t -> f:('ok -> 'c) -> ('c, 'err) Result.t
val map_error :
('ok, 'err) Result.t -> f:('err -> 'c) -> ('ok, 'c) Result.t
val combine :
('ok1, 'err) Result.t ->
('ok2, 'err) Result.t ->
ok:('ok1 -> 'ok2 -> 'ok3) ->
err:('err -> 'err -> 'err) -> ('ok3, 'err) Result.t
val ok_fst : ('ok, 'err) Result.t -> [ `Fst of 'ok | `Snd of 'err ]
val ok_if_true : bool -> error:'err -> (unit, 'err) Result.t
val try_with : (unit -> 'a) -> ('a, exn) Result.t
val ok_exn : ('ok, exn) Result.t -> 'ok
val ok_or_failwith : ('ok, string) Result.t -> 'ok
val ok_unit : (unit, 'a) Result.t
module Export :
sig
type ('ok, 'err) _result =
('ok, 'err) Result.t =
Ok of 'ok
| Error of 'err
val is_ok : ('a, 'b) Result.t -> bool
val is_error : ('a, 'b) Result.t -> bool
end
module Stable :
sig
module V1 :
sig
type ('ok, 'err) t = ('ok, 'err) t = Ok of 'ok | Error of 'err
val map :
('a1, 'a2) t ->
f1:('a1 -> 'b1) -> f2:('a2 -> 'b2) -> ('b1, 'b2) t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a1) ->
(Sexplib.Sexp.t -> 'a2) -> Sexplib.Sexp.t -> ('a1, 'a2) t
val sexp_of_t :
('a1 -> Sexplib.Sexp.t) ->
('a2 -> Sexplib.Sexp.t) -> ('a1, 'a2) t -> Sexplib.Sexp.t
val compare :
('a1 -> 'a1 -> int) ->
('a2 -> 'a2 -> int) -> ('a1, 'a2) t -> ('a1, 'a2) t -> int
val bin_t :
'a1 Bin_prot.Type_class.t ->
'a2 Bin_prot.Type_class.t -> ('a1, 'a2) t Bin_prot.Type_class.t
val bin_read_t :
'a1 Bin_prot.Read.reader ->
'a2 Bin_prot.Read.reader -> ('a1, 'a2) t Bin_prot.Read.reader
val __bin_read_t__ :
'a1 Bin_prot.Read.reader ->
'a2 Bin_prot.Read.reader ->
(int -> ('a1, 'a2) t) Bin_prot.Read.reader
val bin_reader_t :
'a1 Bin_prot.Type_class.reader ->
'a2 Bin_prot.Type_class.reader ->
('a1, 'a2) t Bin_prot.Type_class.reader
val bin_size_t :
'a1 Bin_prot.Size.sizer ->
'a2 Bin_prot.Size.sizer -> ('a1, 'a2) t Bin_prot.Size.sizer
val bin_write_t :
'a1 Bin_prot.Write.writer ->
'a2 Bin_prot.Write.writer -> ('a1, 'a2) t Bin_prot.Write.writer
val bin_writer_t :
'a1 Bin_prot.Type_class.writer ->
'a2 Bin_prot.Type_class.writer ->
('a1, 'a2) t Bin_prot.Type_class.writer
end
module V1_stable_unit_test : Stable_unit_test_intf.Arg
end
val compare :
('ok -> 'ok -> int) ->
('err -> 'err -> int) ->
('ok, 'err) Result.t -> ('ok, 'err) Result.t -> int
val t_of_sexp :
(Sexplib.Sexp.t -> 'ok) ->
(Sexplib.Sexp.t -> 'err) -> Sexplib.Sexp.t -> ('ok, 'err) Result.t
val sexp_of_t :
('ok -> Sexplib.Sexp.t) ->
('err -> Sexplib.Sexp.t) -> ('ok, 'err) Result.t -> Sexplib.Sexp.t
val bin_t :
'ok Bin_prot.Type_class.t ->
'err Bin_prot.Type_class.t -> ('ok, 'err) Result.t Bin_prot.Type_class.t
val bin_read_t :
'ok Bin_prot.Read.reader ->
'err Bin_prot.Read.reader -> ('ok, 'err) Result.t Bin_prot.Read.reader
val __bin_read_t__ :
'ok Bin_prot.Read.reader ->
'err Bin_prot.Read.reader ->
(int -> ('ok, 'err) Result.t) Bin_prot.Read.reader
val bin_reader_t :
'ok Bin_prot.Type_class.reader ->
'err Bin_prot.Type_class.reader ->
('ok, 'err) Result.t Bin_prot.Type_class.reader
val bin_size_t :
'ok Bin_prot.Size.sizer ->
'err Bin_prot.Size.sizer -> ('ok, 'err) Result.t Bin_prot.Size.sizer
val bin_write_t :
'ok Bin_prot.Write.writer ->
'err Bin_prot.Write.writer -> ('ok, 'err) Result.t Bin_prot.Write.writer
val bin_writer_t :
'ok Bin_prot.Type_class.writer ->
'err Bin_prot.Type_class.writer ->
('ok, 'err) Result.t Bin_prot.Type_class.writer
end`