sig
type ('f, 's) t = First of 'f | Second of 's
val typerep_of_t :
'f Typerep_lib.Std.Typerep.t ->
's Typerep_lib.Std.Typerep.t ->
('f, 's) Either_intf.S.t Typerep_lib.Std.Typerep.t
val typename_of_t :
'f Typerep_lib.Std.Typename.t ->
's Typerep_lib.Std.Typename.t ->
('f, 's) Either_intf.S.t Typerep_lib.Std.Typename.t
val invariant :
'a Invariant_intf.inv ->
'b Invariant_intf.inv -> ('a, 'b) t Invariant_intf.inv
val swap : ('f, 's) Either_intf.S.t -> ('s, 'f) Either_intf.S.t
val value : ('a, 'a) Either_intf.S.t -> 'a
val iter :
('a, 'b) Either_intf.S.t ->
first:('a -> unit) -> second:('b -> unit) -> unit
val value_map :
('a, 'b) Either_intf.S.t -> first:('a -> 'c) -> second:('b -> 'c) -> 'c
val map :
('a, 'b) Either_intf.S.t ->
first:('a -> 'c) -> second:('b -> 'd) -> ('c, 'd) Either_intf.S.t
val equal :
('f -> 'f -> bool) ->
('s -> 's -> bool) ->
('f, 's) Either_intf.S.t -> ('f, 's) Either_intf.S.t -> bool
module First :
sig
type ('a, 'b) t = ('a, 'b) t
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 join : (('a, 'e) t, 'e) t -> ('a, 'e) t
val ignore_m : ('a, 'e) t -> (unit, 'e) t
val all_ignore : (unit, 'e) t list -> (unit, 'e) t
val return : 'a -> ('a, 'b) t
val apply : ('a -> 'b, 'e) t -> ('a, 'e) t -> ('b, 'e) t
val map : ('a, 'e) t -> f:('a -> 'b) -> ('b, 'e) t
val map2 : ('a, 'e) t -> ('b, 'e) t -> f:('a -> 'b -> 'c) -> ('c, 'e) t
val map3 :
('a, 'e) t ->
('b, 'e) t -> ('c, 'e) t -> f:('a -> 'b -> 'c -> 'd) -> ('d, 'e) t
val all : ('a, 'e) t list -> ('a list, 'e) t
val both : ('a, 'e) t -> ('b, 'e) t -> ('a * 'b, 'e) t
module Applicative_infix :
sig
val ( <*> ) : ('a -> 'b, 'e) t -> ('a, 'e) t -> ('b, 'e) t
val ( <* ) : ('a, 'e) t -> (unit, 'e) t -> ('a, 'e) t
val ( *> ) : (unit, 'e) t -> ('a, 'e) t -> ('a, 'e) t
end
val ( <*> ) : ('a -> 'b, 'e) t -> ('a, 'e) t -> ('b, 'e) t
val ( <* ) : ('a, 'e) t -> (unit, 'e) t -> ('a, 'e) t
val ( *> ) : (unit, 'e) t -> ('a, 'e) t -> ('a, 'e) t
val mem : ?equal:('a -> 'a -> bool) -> ('a, 'b) t -> 'a -> bool
val length : ('a, 'b) t -> int
val is_empty : ('a, 'b) t -> bool
val iter : ('a, 'b) t -> f:('a -> unit) -> unit
val fold :
('a, 'b) t -> init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : ('a, 'b) t -> f:('a -> bool) -> bool
val for_all : ('a, 'b) t -> f:('a -> bool) -> bool
val count : ('a, 'b) t -> f:('a -> bool) -> int
val sum :
(module Commutative_group.S with type t = 'sum) ->
('a, 'b) t -> f:('a -> 'sum) -> 'sum
val find : ('a, 'b) t -> f:('a -> bool) -> 'a option
val find_map : ('a, 'c) t -> f:('a -> 'b option) -> 'b option
val to_list : ('a, 'b) t -> 'a list
val to_array : ('a, 'b) t -> 'a array
val min_elt : ('a, 'b) t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt : ('a, 'b) t -> cmp:('a -> 'a -> int) -> 'a option
module Args :
sig
type ('f, 'r, 'e) t
val nil : ('r, 'r, 'a) t
val cons : ('a, 'e) t -> ('f, 'r, 'e) t -> ('a -> 'f, 'r, 'e) t
val ( @> ) : ('a, 'e) t -> ('f, 'r, 'e) t -> ('a -> 'f, 'r, 'e) t
val step : ('f1, 'r, 'e) t -> f:('f2 -> 'f1) -> ('f2, 'r, 'e) t
val mapN : f:'f -> ('f, 'r, 'e) t -> ('r, 'e) t
val applyN : ('f, 'e) t -> ('f, 'r, 'e) t -> ('r, 'e) t
end
val value : ('a, 'b) t -> default:'a -> 'a
val to_option : ('a, 'b) t -> 'a option
val with_return : ('a With_return.return -> 'b) -> ('a, 'b) t
val combine :
('a, 'd) t ->
('b, 'd) t ->
f:('a -> 'b -> 'c) -> other:('d -> 'd -> 'd) -> ('c, 'd) t
val combine_all :
('a, 'b) t list -> f:('b -> 'b -> 'b) -> ('a list, 'b) t
val combine_all_unit :
(unit, 'b) t list -> f:('b -> 'b -> 'b) -> (unit, 'b) t
end
module Second :
sig
type ('a, 'b) t = ('b, 'a) t
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 join : (('a, 'e) t, 'e) t -> ('a, 'e) t
val ignore_m : ('a, 'e) t -> (unit, 'e) t
val all_ignore : (unit, 'e) t list -> (unit, 'e) t
val return : 'a -> ('a, 'b) t
val apply : ('a -> 'b, 'e) t -> ('a, 'e) t -> ('b, 'e) t
val map : ('a, 'e) t -> f:('a -> 'b) -> ('b, 'e) t
val map2 : ('a, 'e) t -> ('b, 'e) t -> f:('a -> 'b -> 'c) -> ('c, 'e) t
val map3 :
('a, 'e) t ->
('b, 'e) t -> ('c, 'e) t -> f:('a -> 'b -> 'c -> 'd) -> ('d, 'e) t
val all : ('a, 'e) t list -> ('a list, 'e) t
val both : ('a, 'e) t -> ('b, 'e) t -> ('a * 'b, 'e) t
module Applicative_infix :
sig
val ( <*> ) : ('a -> 'b, 'e) t -> ('a, 'e) t -> ('b, 'e) t
val ( <* ) : ('a, 'e) t -> (unit, 'e) t -> ('a, 'e) t
val ( *> ) : (unit, 'e) t -> ('a, 'e) t -> ('a, 'e) t
end
val ( <*> ) : ('a -> 'b, 'e) t -> ('a, 'e) t -> ('b, 'e) t
val ( <* ) : ('a, 'e) t -> (unit, 'e) t -> ('a, 'e) t
val ( *> ) : (unit, 'e) t -> ('a, 'e) t -> ('a, 'e) t
val mem : ?equal:('a -> 'a -> bool) -> ('a, 'b) t -> 'a -> bool
val length : ('a, 'b) t -> int
val is_empty : ('a, 'b) t -> bool
val iter : ('a, 'b) t -> f:('a -> unit) -> unit
val fold :
('a, 'b) t -> init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val exists : ('a, 'b) t -> f:('a -> bool) -> bool
val for_all : ('a, 'b) t -> f:('a -> bool) -> bool
val count : ('a, 'b) t -> f:('a -> bool) -> int
val sum :
(module Commutative_group.S with type t = 'sum) ->
('a, 'b) t -> f:('a -> 'sum) -> 'sum
val find : ('a, 'b) t -> f:('a -> bool) -> 'a option
val find_map : ('a, 'c) t -> f:('a -> 'b option) -> 'b option
val to_list : ('a, 'b) t -> 'a list
val to_array : ('a, 'b) t -> 'a array
val min_elt : ('a, 'b) t -> cmp:('a -> 'a -> int) -> 'a option
val max_elt : ('a, 'b) t -> cmp:('a -> 'a -> int) -> 'a option
module Args :
sig
type ('f, 'r, 'e) t
val nil : ('r, 'r, 'a) t
val cons : ('a, 'e) t -> ('f, 'r, 'e) t -> ('a -> 'f, 'r, 'e) t
val ( @> ) : ('a, 'e) t -> ('f, 'r, 'e) t -> ('a -> 'f, 'r, 'e) t
val step : ('f1, 'r, 'e) t -> f:('f2 -> 'f1) -> ('f2, 'r, 'e) t
val mapN : f:'f -> ('f, 'r, 'e) t -> ('r, 'e) t
val applyN : ('f, 'e) t -> ('f, 'r, 'e) t -> ('r, 'e) t
end
val value : ('a, 'b) t -> default:'a -> 'a
val to_option : ('a, 'b) t -> 'a option
val with_return : ('a With_return.return -> 'b) -> ('a, 'b) t
val combine :
('a, 'd) t ->
('b, 'd) t ->
f:('a -> 'b -> 'c) -> other:('d -> 'd -> 'd) -> ('c, 'd) t
val combine_all :
('a, 'b) t list -> f:('b -> 'b -> 'b) -> ('a list, 'b) t
val combine_all_unit :
(unit, 'b) t list -> f:('b -> 'b -> 'b) -> (unit, 'b) t
end
val is_first : ('a, 'b) Either_intf.S.t -> bool
val is_second : ('a, 'b) Either_intf.S.t -> bool
val first : 'f -> ('f, 'a) Either_intf.S.t
val second : 's -> ('a, 's) Either_intf.S.t
module Export :
sig
type ('f, 's) _either =
('f, 's) Either_intf.S.t =
First of 'f
| Second of 's
end
module Stable :
sig
module V1 :
sig
type ('f, 's) t = ('f, 's) t = First of 'f | Second of 's
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
end
val t_of_sexp :
(Sexplib.Sexp.t -> 'f) ->
(Sexplib.Sexp.t -> 's) -> Sexplib.Sexp.t -> ('f, 's) Either_intf.S.t
val sexp_of_t :
('f -> Sexplib.Sexp.t) ->
('s -> Sexplib.Sexp.t) -> ('f, 's) Either_intf.S.t -> Sexplib.Sexp.t
val compare :
('f -> 'f -> int) ->
('s -> 's -> int) ->
('f, 's) Either_intf.S.t -> ('f, 's) Either_intf.S.t -> int
val bin_t :
'f Bin_prot.Type_class.t ->
's Bin_prot.Type_class.t ->
('f, 's) Either_intf.S.t Bin_prot.Type_class.t
val bin_read_t :
'f Bin_prot.Read.reader ->
's Bin_prot.Read.reader -> ('f, 's) Either_intf.S.t Bin_prot.Read.reader
val __bin_read_t__ :
'f Bin_prot.Read.reader ->
's Bin_prot.Read.reader ->
(int -> ('f, 's) Either_intf.S.t) Bin_prot.Read.reader
val bin_reader_t :
'f Bin_prot.Type_class.reader ->
's Bin_prot.Type_class.reader ->
('f, 's) Either_intf.S.t Bin_prot.Type_class.reader
val bin_size_t :
'f Bin_prot.Size.sizer ->
's Bin_prot.Size.sizer -> ('f, 's) Either_intf.S.t Bin_prot.Size.sizer
val bin_write_t :
'f Bin_prot.Write.writer ->
's Bin_prot.Write.writer ->
('f, 's) Either_intf.S.t Bin_prot.Write.writer
val bin_writer_t :
'f Bin_prot.Type_class.writer ->
's Bin_prot.Type_class.writer ->
('f, 's) Either_intf.S.t Bin_prot.Type_class.writer
end