sig
  type ('f, 's) t = First of '| Second of 's
  val typerep_of_t :
    'Typerep_lib.Std.Typerep.t ->
    'Typerep_lib.Std.Typerep.t ->
    ('f, 's) Either_intf.S.t Typerep_lib.Std.Typerep.t
  val typename_of_t :
    'Typerep_lib.Std.Typename.t ->
    'Typerep_lib.Std.Typename.t ->
    ('f, 's) Either_intf.S.t Typerep_lib.Std.Typename.t
  val invariant :
    'Invariant_intf.inv ->
    '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:('-> unit) -> second:('-> unit) -> unit
  val value_map :
    ('a, 'b) Either_intf.S.t -> first:('-> 'c) -> second:('-> 'c) -> 'c
  val map :
    ('a, 'b) Either_intf.S.t ->
    first:('-> 'c) -> second:('-> 'd) -> ('c, 'd) Either_intf.S.t
  val equal :
    ('-> '-> bool) ->
    ('-> '-> 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 -> ('-> ('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
  module Second :
    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
  val is_first : ('a, 'b) Either_intf.S.t -> bool
  val is_second : ('a, 'b) Either_intf.S.t -> bool
  val first : '-> ('f, 'a) Either_intf.S.t
  val second : '-> ('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 '| 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 :
    ('-> Sexplib.Sexp.t) ->
    ('-> Sexplib.Sexp.t) -> ('f, 's) Either_intf.S.t -> Sexplib.Sexp.t
  val compare :
    ('-> '-> int) ->
    ('-> '-> int) ->
    ('f, 's) Either_intf.S.t -> ('f, 's) Either_intf.S.t -> int
  val bin_t :
    'Bin_prot.Type_class.t ->
    'Bin_prot.Type_class.t ->
    ('f, 's) Either_intf.S.t Bin_prot.Type_class.t
  val bin_read_t :
    'Bin_prot.Read.reader ->
    'Bin_prot.Read.reader -> ('f, 's) Either_intf.S.t Bin_prot.Read.reader
  val __bin_read_t__ :
    'Bin_prot.Read.reader ->
    'Bin_prot.Read.reader ->
    (int -> ('f, 's) Either_intf.S.t) Bin_prot.Read.reader
  val bin_reader_t :
    'Bin_prot.Type_class.reader ->
    'Bin_prot.Type_class.reader ->
    ('f, 's) Either_intf.S.t Bin_prot.Type_class.reader
  val bin_size_t :
    'Bin_prot.Size.sizer ->
    'Bin_prot.Size.sizer -> ('f, 's) Either_intf.S.t Bin_prot.Size.sizer
  val bin_write_t :
    'Bin_prot.Write.writer ->
    'Bin_prot.Write.writer ->
    ('f, 's) Either_intf.S.t Bin_prot.Write.writer
  val bin_writer_t :
    'Bin_prot.Type_class.writer ->
    'Bin_prot.Type_class.writer ->
    ('f, 's) Either_intf.S.t Bin_prot.Type_class.writer
end