module Res: sig
.. end
type ('a, 'b)
res = [ `Error of 'b | `Ok of 'a ]
type 'a
m = ('a, exn) res
val return : 'a -> [> `Ok of 'a ]
val fail : 'a -> [> `Error of 'a ]
val error : 'a -> [> `Error of 'a ]
val bind : ('a -> ([> `Error of 'c ] as 'b)) -> [< `Error of 'c | `Ok of 'a ] -> 'b
val (>>=) : [< `Error of 'a | `Ok of 'b ] -> ('b -> ([> `Error of 'a ] as 'c)) -> 'c
val bind_rev : [< `Error of 'a | `Ok of 'b ] -> ('b -> ([> `Error of 'a ] as 'c)) -> 'c
val catch : (unit -> [< `Error of 'a | `Ok of 'b ]) ->
('a -> ([> `Ok of 'b ] as 'c)) -> 'c
val wrap1 : ('a -> 'b) -> 'a -> [> `Error of exn | `Ok of 'b ]
val wrap2 : ('a -> 'b -> 'c) -> 'a -> 'b -> [> `Error of exn | `Ok of 'c ]
val wrap3 : ('a -> 'b -> 'c -> 'd) -> 'a -> 'b -> 'c -> [> `Error of exn | `Ok of 'd ]
val wrap4 : ('a -> 'b -> 'c -> 'd -> 'e) ->
'a -> 'b -> 'c -> 'd -> [> `Error of exn | `Ok of 'e ]
val wrap5 : ('a -> 'b -> 'c -> 'd -> 'e -> 'f) ->
'a -> 'b -> 'c -> 'd -> 'e -> [> `Error of exn | `Ok of 'f ]
val catch_exn : (unit -> ([> `Error of exn ] as 'a)) -> 'a
val catch_all : (unit -> [< `Error of exn | `Ok of 'a > `Error ]) ->
(exn -> ([> `Ok of 'a ] as 'b)) -> 'b
val exn_res : [< `Error of exn | `Ok of 'a ] -> 'a
val map_err : ('a -> 'b) -> [< `Error of 'a | `Ok of 'c ] -> [> `Error of 'b | `Ok of 'c ]
val res_opterr : 'a option -> [> `Error of 'a | `Ok of unit ]
val res_optval : 'a option -> [> `Error of unit | `Ok of 'a ]
val res_exn : (unit -> 'a) -> [> `Error of exn | `Ok of 'a ]
exception Foldres_exit
val foldres_of_fold : (('a -> 'b -> 'a) -> 'a -> 'c -> 'a) ->
('a -> 'b -> ('a, 'd) res) -> 'a -> 'c -> ('a, 'd) res
val rprintf : ('a, unit, string, [> `Error of exn | `Ok of unit ]) Pervasives.format4 -> 'a
val reprintf : ('a, unit, string, [> `Error of exn | `Ok of unit ]) Pervasives.format4 -> 'a
val wrap_with1 : ('a -> ('b -> 'c) -> 'd) ->
'a ->
('b -> [< `Error of exn | `Ok of 'c ]) -> [> `Error of exn | `Ok of 'd ]
val wrap_with3 : ('a -> 'b -> 'c -> ('d -> 'e) -> 'f) ->
'a ->
'b ->
'c ->
('d -> [< `Error of exn | `Ok of 'e ]) -> [> `Error of exn | `Ok of 'f ]
val list_map_all : ('a -> [< `Error of 'b | `Ok of 'c ]) ->
'a list -> [> `Error of 'a * 'b | `Ok of 'c list ]
val array_map_all : ('a -> [< `Error of 'b | `Ok of 'c ]) ->
'a array -> [> `Error of 'a * 'b | `Ok of 'c array ]
val list_fold_left_all : ('a -> 'b -> [< `Error of 'c | `Ok of 'a ]) ->
'a -> 'b list -> [> `Error of 'b * 'b list * 'a * 'c | `Ok of 'a ]
val list_iter_all : ('a -> (unit, 'b) res) ->
'a list -> [> `Error of 'a * 'a list * 'b | `Ok of unit ]
val repeat : int ->
('a -> [< `Error of 'b | `Ok of 'a ]) ->
'a -> [> `Error of 'b * int | `Ok of 'a ]