sig
  type ('a, 'b) t = ('b, 'a) t
  val ( >>= ) : ('a, 'e) t -> ('-> ('b, 'e) t) -> ('b, 'e) t
  val ( >>| ) : ('a, 'e) t -> ('-> 'b) -> ('b, 'e) t
  module Monad_infix :
    sig
      val ( >>= ) : ('a, 'e) t -> ('-> ('b, 'e) t) -> ('b, 'e) t
      val ( >>| ) : ('a, 'e) t -> ('-> 'b) -> ('b, 'e) t
    end
  val bind : ('a, 'e) t -> ('-> ('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, 'b) t
  val apply : ('-> 'b, 'e) t -> ('a, 'e) t -> ('b, 'e) t
  val map : ('a, 'e) t -> f:('-> 'b) -> ('b, 'e) t
  val map2 : ('a, 'e) t -> ('b, 'e) t -> f:('-> '-> 'c) -> ('c, 'e) t
  val map3 :
    ('a, 'e) t ->
    ('b, 'e) t -> ('c, 'e) t -> f:('-> '-> '-> '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 ( <*> ) : ('-> '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 ( <*> ) : ('-> '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:('-> '-> bool) -> ('a, 'b) t -> '-> bool
  val length : ('a, 'b) t -> int
  val is_empty : ('a, 'b) t -> bool
  val iter : ('a, 'b) t -> f:('-> unit) -> unit
  val fold :
    ('a, 'b) t -> init:'accum -> f:('accum -> '-> 'accum) -> 'accum
  val exists : ('a, 'b) t -> f:('-> bool) -> bool
  val for_all : ('a, 'b) t -> f:('-> bool) -> bool
  val count : ('a, 'b) t -> f:('-> bool) -> int
  val sum :
    (module Commutative_group.S with type t = 'sum) ->
    ('a, 'b) t -> f:('-> 'sum) -> 'sum
  val find : ('a, 'b) t -> f:('-> bool) -> 'a option
  val find_map : ('a, 'c) t -> f:('-> '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:('-> '-> int) -> 'a option
  val max_elt : ('a, 'b) t -> cmp:('-> '-> 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 -> ('-> 'f, 'r, 'e) t
      val ( @> ) : ('a, 'e) t -> ('f, 'r, 'e) t -> ('-> 'f, 'r, 'e) t
      val step : ('f1, 'r, 'e) t -> f:('f2 -> 'f1) -> ('f2, 'r, 'e) t
      val mapN : 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
  val to_option : ('a, 'b) t -> 'a option
  val with_return : ('With_return.return -> 'b) -> ('a, 'b) t
  val combine :
    ('a, 'd) t ->
    ('b, 'd) t -> f:('-> '-> 'c) -> other:('-> '-> 'd) -> ('c, 'd) t
  val combine_all : ('a, 'b) t list -> f:('-> '-> 'b) -> ('a list, 'b) t
  val combine_all_unit :
    (unit, 'b) t list -> f:('-> '-> 'b) -> (unit, 'b) t
end