sig
  type ('elt, 'cmp) t
  module Tree :
    sig
      type ('a, 'cmp) t
      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 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 invariants :
        comparator:('a, 'cmp) Comparator.t -> ('a, 'cmp) t -> bool
      val mem :
        comparator:('a, 'cmp) Comparator.t -> ('a, 'cmp) t -> '-> bool
      val add :
        comparator:('a, 'cmp) Comparator.t ->
        ('a, 'cmp) t -> '-> ('a, 'cmp) t
      val remove :
        comparator:('a, 'cmp) Comparator.t ->
        ('a, 'cmp) t -> '-> ('a, 'cmp) t
      val union :
        comparator:('a, 'cmp) Comparator.t ->
        ('a, 'cmp) t -> ('a, 'cmp) t -> ('a, 'cmp) t
      val inter :
        comparator:('a, 'cmp) Comparator.t ->
        ('a, 'cmp) t -> ('a, 'cmp) t -> ('a, 'cmp) t
      val diff :
        comparator:('a, 'cmp) Comparator.t ->
        ('a, 'cmp) t -> ('a, 'cmp) t -> ('a, 'cmp) t
      val compare_direct :
        comparator:('a, 'cmp) Comparator.t ->
        ('a, 'cmp) t -> ('a, 'cmp) t -> int
      val equal :
        comparator:('a, 'cmp) Comparator.t ->
        ('a, 'cmp) t -> ('a, 'cmp) t -> bool
      val subset :
        comparator:('a, 'cmp) Comparator.t ->
        ('a, 'cmp) t -> ('a, 'cmp) t -> bool
      val fold_until :
        ('a, 'b) t ->
        init:'accum ->
        f:('accum -> '-> [ `Continue of 'accum | `Stop of 'accum ]) ->
        'accum
      val fold_right :
        ('a, 'b) t -> init:'accum -> f:('-> 'accum -> 'accum) -> 'accum
      val iter2 :
        comparator:('a, 'cmp) Comparator.t ->
        ('a, 'cmp) t ->
        ('a, 'cmp) t ->
        f:([ `Both of 'a * '| `Left of '| `Right of 'a ] -> unit) -> unit
      val filter :
        comparator:('a, 'cmp) Comparator.t ->
        ('a, 'cmp) t -> f:('-> bool) -> ('a, 'cmp) t
      val partition_tf :
        comparator:('a, 'cmp) Comparator.t ->
        ('a, 'cmp) t -> f:('-> bool) -> ('a, 'cmp) t * ('a, 'cmp) t
      val elements : ('a, 'b) t -> 'a list
      val min_elt : ('a, 'b) t -> 'a option
      val min_elt_exn : ('a, 'b) t -> 'a
      val max_elt : ('a, 'b) t -> 'a option
      val max_elt_exn : ('a, 'b) t -> 'a
      val choose : ('a, 'b) t -> 'a option
      val choose_exn : ('a, 'b) t -> 'a
      val split :
        comparator:('a, 'cmp) Comparator.t ->
        ('a, 'cmp) t -> '-> ('a, 'cmp) t * bool * ('a, 'cmp) t
      val group_by :
        comparator:('a, 'cmp) Comparator.t ->
        ('a, 'cmp) t -> equiv:('-> '-> bool) -> ('a, 'cmp) t list
      val find_exn : ('a, 'b) t -> f:('-> bool) -> 'a
      val find_index : ('a, 'b) t -> int -> 'a option
      val remove_index :
        comparator:('a, 'cmp) Comparator.t ->
        ('a, 'cmp) t -> int -> ('a, 'cmp) t
      val to_tree : ('a, 'cmp) t -> ('a, 'cmp) t
      val empty : comparator:('a, 'cmp) Comparator.t -> ('a, 'cmp) t
      val singleton :
        comparator:('a, 'cmp) Comparator.t -> '-> ('a, 'cmp) t
      val union_list :
        comparator:('a, 'cmp) Comparator.t ->
        ('a, 'cmp) t list -> ('a, 'cmp) t
      val of_list :
        comparator:('a, 'cmp) Comparator.t -> 'a list -> ('a, 'cmp) t
      val of_array :
        comparator:('a, 'cmp) Comparator.t -> 'a array -> ('a, 'cmp) t
      val of_sorted_array :
        comparator:('a, 'cmp) Comparator.t ->
        'a array -> ('a, 'cmp) t Or_error.t
      val of_sorted_array_unchecked :
        comparator:('a, 'cmp) Comparator.t -> 'a array -> ('a, 'cmp) t
      val stable_dedup_list :
        comparator:('a, 'cmp) Comparator.t -> 'a list -> 'a list
      val map :
        comparator:('b, 'cmp) Comparator.t ->
        ('a, 'c) t -> f:('-> 'b) -> ('b, 'cmp) t
      val filter_map :
        comparator:('b, 'cmp) Comparator.t ->
        ('a, 'c) t -> f:('-> 'b option) -> ('b, 'cmp) t
      val of_tree :
        comparator:('a, 'cmp) Comparator.t -> ('a, 'cmp) t -> ('a, 'cmp) t
      val sexp_of_t :
        ('-> Sexplib.Sexp.t) ->
        ('cmp -> Sexplib.Sexp.t) ->
        ('a, 'cmp) Core_set.Tree.t -> Sexplib.Sexp.t
    end
  val invariants : ('a, 'b) Core_set.t -> bool
  val comparator : ('a, 'cmp) Core_set.t -> ('a, 'cmp) Comparator.t
  val empty : comparator:('a, 'cmp) Comparator.t -> ('a, 'cmp) Core_set.t
  val singleton :
    comparator:('a, 'cmp) Comparator.t -> '-> ('a, 'cmp) Core_set.t
  val length : ('a, 'b) Core_set.t -> int
  val is_empty : ('a, 'b) Core_set.t -> bool
  val mem : ('a, 'b) Core_set.t -> '-> bool
  val add : ('a, 'cmp) Core_set.t -> '-> ('a, 'cmp) Core_set.t
  val remove : ('a, 'cmp) Core_set.t -> '-> ('a, 'cmp) Core_set.t
  val union :
    ('a, 'cmp) Core_set.t -> ('a, 'cmp) Core_set.t -> ('a, 'cmp) Core_set.t
  val union_list :
    comparator:('a, 'cmp) Comparator.t ->
    ('a, 'cmp) Core_set.t list -> ('a, 'cmp) Core_set.t
  val inter :
    ('a, 'cmp) Core_set.t -> ('a, 'cmp) Core_set.t -> ('a, 'cmp) Core_set.t
  val diff :
    ('a, 'cmp) Core_set.t -> ('a, 'cmp) Core_set.t -> ('a, 'cmp) Core_set.t
  val compare_direct : ('a, 'cmp) Core_set.t -> ('a, 'cmp) Core_set.t -> int
  val equal : ('a, 'cmp) Core_set.t -> ('a, 'cmp) Core_set.t -> bool
  val exists : ('a, 'b) Core_set.t -> f:('-> bool) -> bool
  val for_all : ('a, 'b) Core_set.t -> f:('-> bool) -> bool
  val count : ('a, 'b) Core_set.t -> f:('-> bool) -> int
  val find : ('a, 'b) Core_set.t -> f:('-> bool) -> 'a option
  val find_map : ('a, 'c) Core_set.t -> f:('-> 'b option) -> 'b option
  val find_exn : ('a, 'b) Core_set.t -> f:('-> bool) -> 'a
  val find_index : ('a, 'b) Core_set.t -> int -> 'a option
  val remove_index : ('a, 'cmp) Core_set.t -> int -> ('a, 'cmp) Core_set.t
  val subset : ('a, 'cmp) Core_set.t -> ('a, 'cmp) Core_set.t -> bool
  val of_list :
    comparator:('a, 'cmp) Comparator.t -> 'a list -> ('a, 'cmp) Core_set.t
  val of_array :
    comparator:('a, 'cmp) Comparator.t -> 'a array -> ('a, 'cmp) Core_set.t
  val to_list : ('a, 'b) Core_set.t -> 'a list
  val to_array : ('a, 'b) Core_set.t -> 'a array
  val to_tree : ('a, 'cmp) Core_set.t -> ('a, 'cmp) Core_set.Tree.t
  val of_tree :
    comparator:('a, 'cmp) Comparator.t ->
    ('a, 'cmp) Core_set.Tree.t -> ('a, 'cmp) Core_set.t
  val of_sorted_array :
    comparator:('a, 'cmp) Comparator.t ->
    'a array -> ('a, 'cmp) Core_set.t Or_error.t
  val of_sorted_array_unchecked :
    comparator:('a, 'cmp) Comparator.t -> 'a array -> ('a, 'cmp) Core_set.t
  val stable_dedup_list :
    comparator:('a, 'b) Comparator.t -> 'a list -> 'a list
  val map :
    comparator:('b, 'cmp) Comparator.t ->
    ('a, 'c) Core_set.t -> f:('-> 'b) -> ('b, 'cmp) Core_set.t
  val filter_map :
    comparator:('b, 'cmp) Comparator.t ->
    ('a, 'c) Core_set.t -> f:('-> 'b option) -> ('b, 'cmp) Core_set.t
  val filter :
    ('a, 'cmp) Core_set.t -> f:('-> bool) -> ('a, 'cmp) Core_set.t
  val fold :
    ('a, 'b) Core_set.t ->
    init:'accum -> f:('accum -> '-> 'accum) -> 'accum
  val fold_until :
    ('a, 'b) Core_set.t ->
    init:'accum ->
    f:('accum -> '-> [ `Continue of 'accum | `Stop of 'accum ]) -> 'accum
  val fold_right :
    ('a, 'b) Core_set.t ->
    init:'accum -> f:('-> 'accum -> 'accum) -> 'accum
  val iter : ('a, 'b) Core_set.t -> f:('-> unit) -> unit
  val iter2 :
    ('a, 'cmp) Core_set.t ->
    ('a, 'cmp) Core_set.t ->
    f:([ `Both of 'a * '| `Left of '| `Right of 'a ] -> unit) -> unit
  val partition_tf :
    ('a, 'cmp) Core_set.t ->
    f:('-> bool) -> ('a, 'cmp) Core_set.t * ('a, 'cmp) Core_set.t
  val elements : ('a, 'b) Core_set.t -> 'a list
  val min_elt : ('a, 'b) Core_set.t -> 'a option
  val min_elt_exn : ('a, 'b) Core_set.t -> 'a
  val max_elt : ('a, 'b) Core_set.t -> 'a option
  val max_elt_exn : ('a, 'b) Core_set.t -> 'a
  val choose : ('a, 'b) Core_set.t -> 'a option
  val choose_exn : ('a, 'b) Core_set.t -> 'a
  val split :
    ('a, 'cmp) Core_set.t ->
    '-> ('a, 'cmp) Core_set.t * bool * ('a, 'cmp) Core_set.t
  val group_by :
    ('a, 'cmp) Core_set.t ->
    equiv:('-> '-> bool) -> ('a, 'cmp) Core_set.t list
  module Poly :
    sig
      module Tree :
        sig
          type 'elt t = ('elt, Comparator.Poly.comparator) Core_set.Tree.t
          val length : 'a t -> int
          val is_empty : 'a t -> bool
          val iter : 'a t -> f:('-> unit) -> unit
          val fold :
            'a t -> init:'accum -> f:('accum -> '-> 'accum) -> 'accum
          val exists : 'a t -> f:('-> bool) -> bool
          val for_all : 'a t -> f:('-> bool) -> bool
          val count : 'a t -> f:('-> bool) -> int
          val find : 'a t -> f:('-> bool) -> 'a option
          val find_map : 'a t -> f:('-> 'b option) -> 'b option
          val to_list : 'a t -> 'a list
          val to_array : 'a t -> 'a array
          val invariants : 'a t -> bool
          val mem : 'a t -> '-> bool
          val add : 'a t -> '-> 'a t
          val remove : 'a t -> '-> 'a t
          val union : 'a t -> 'a t -> 'a t
          val inter : 'a t -> 'a t -> 'a t
          val diff : 'a t -> 'a t -> 'a t
          val compare_direct : 'a t -> 'a t -> int
          val equal : 'a t -> 'a t -> bool
          val subset : 'a t -> 'a t -> bool
          val fold_until :
            'a t ->
            init:'->
            f:('-> '-> [ `Continue of '| `Stop of 'b ]) -> 'b
          val fold_right : 'a t -> init:'-> f:('-> '-> 'b) -> 'b
          val iter2 :
            'a t ->
            'a t ->
            f:([ `Both of 'a * '| `Left of '| `Right of 'a ] -> unit) ->
            unit
          val filter : 'a t -> f:('-> bool) -> 'a t
          val partition_tf : 'a t -> f:('-> bool) -> 'a t * 'a t
          val elements : 'a t -> 'a list
          val min_elt : 'a t -> 'a option
          val min_elt_exn : 'a t -> 'a
          val max_elt : 'a t -> 'a option
          val max_elt_exn : 'a t -> 'a
          val choose : 'a t -> 'a option
          val choose_exn : 'a t -> 'a
          val split : 'a t -> '-> 'a t * bool * 'a t
          val group_by : 'a t -> equiv:('-> '-> bool) -> 'a t list
          val find_exn : 'a t -> f:('-> bool) -> 'a
          val find_index : 'a t -> int -> 'a option
          val remove_index : 'a t -> int -> 'a t
          val to_tree : 'a t -> 'a t
          val empty : 'a t
          val singleton : '-> 'a t
          val union_list : 'a t list -> 'a t
          val of_list : 'a list -> 'a t
          val of_array : 'a array -> 'a t
          val of_sorted_array : 'a array -> 'a t Or_error.t
          val of_sorted_array_unchecked : 'a array -> 'a t
          val stable_dedup_list : 'a list -> 'a list
          val map : ('a, 'c) Tree.t -> f:('-> 'b) -> 'b t
          val filter_map : ('a, 'c) Tree.t -> f:('-> 'b option) -> 'b t
          val of_tree : 'a t -> 'a t
          val t_of_sexp :
            (Sexplib.Sexp.t -> 'elt) ->
            Sexplib.Sexp.t -> 'elt Core_set.Poly.Tree.t
          val sexp_of_t :
            ('elt -> Sexplib.Sexp.t) ->
            'elt Core_set.Poly.Tree.t -> Sexplib.Sexp.t
        end
      type 'elt t = ('elt, Comparator.Poly.comparator) Core_set.Poly.t
      val length : 'a t -> int
      val is_empty : 'a t -> bool
      val iter : 'a t -> f:('-> unit) -> unit
      val fold : 'a t -> init:'accum -> f:('accum -> '-> 'accum) -> 'accum
      val exists : 'a t -> f:('-> bool) -> bool
      val for_all : 'a t -> f:('-> bool) -> bool
      val count : 'a t -> f:('-> bool) -> int
      val find : 'a t -> f:('-> bool) -> 'a option
      val find_map : 'a t -> f:('-> 'b option) -> 'b option
      val to_list : 'a t -> 'a list
      val to_array : 'a t -> 'a array
      val invariants : 'a t -> bool
      val mem : 'a t -> '-> bool
      val add : 'a t -> '-> 'a t
      val remove : 'a t -> '-> 'a t
      val union : 'a t -> 'a t -> 'a t
      val inter : 'a t -> 'a t -> 'a t
      val diff : 'a t -> 'a t -> 'a t
      val compare_direct : 'a t -> 'a t -> int
      val equal : 'a t -> 'a t -> bool
      val subset : 'a t -> 'a t -> bool
      val fold_until :
        'a t ->
        init:'-> f:('-> '-> [ `Continue of '| `Stop of 'b ]) -> 'b
      val fold_right : 'a t -> init:'-> f:('-> '-> 'b) -> 'b
      val iter2 :
        'a t ->
        'a t ->
        f:([ `Both of 'a * '| `Left of '| `Right of 'a ] -> unit) -> unit
      val filter : 'a t -> f:('-> bool) -> 'a t
      val partition_tf : 'a t -> f:('-> bool) -> 'a t * 'a t
      val elements : 'a t -> 'a list
      val min_elt : 'a t -> 'a option
      val min_elt_exn : 'a t -> 'a
      val max_elt : 'a t -> 'a option
      val max_elt_exn : 'a t -> 'a
      val choose : 'a t -> 'a option
      val choose_exn : 'a t -> 'a
      val split : 'a t -> '-> 'a t * bool * 'a t
      val group_by : 'a t -> equiv:('-> '-> bool) -> 'a t list
      val find_exn : 'a t -> f:('-> bool) -> 'a
      val find_index : 'a t -> int -> 'a option
      val remove_index : 'a t -> int -> 'a t
      val to_tree : 'a t -> 'Tree.t
      val empty : 'a t
      val singleton : '-> 'a t
      val union_list : 'a t list -> 'a t
      val of_list : 'a list -> 'a t
      val of_array : 'a array -> 'a t
      val of_sorted_array : 'a array -> 'a t Or_error.t
      val of_sorted_array_unchecked : 'a array -> 'a t
      val stable_dedup_list : 'a list -> 'a list
      val map : ('a, 'c) t -> f:('-> 'b) -> 'b t
      val filter_map : ('a, 'c) t -> f:('-> 'b option) -> 'b t
      val of_tree : 'Tree.t -> 'a t
      val t_of_sexp :
        (Sexplib.Sexp.t -> 'elt) -> Sexplib.Sexp.t -> 'elt Core_set.Poly.t
      val sexp_of_t :
        ('elt -> Sexplib.Sexp.t) -> 'elt Core_set.Poly.t -> Sexplib.Sexp.t
      val compare :
        ('elt -> 'elt -> int) ->
        'elt Core_set.Poly.t -> 'elt Core_set.Poly.t -> int
      val bin_t :
        'elt Bin_prot.Type_class.t ->
        'elt Core_set.Poly.t Bin_prot.Type_class.t
      val bin_read_t :
        'elt Bin_prot.Unsafe_read_c.reader ->
        'elt Core_set.Poly.t Bin_prot.Read_ml.reader
      val bin_read_t_ :
        'elt Bin_prot.Unsafe_read_c.reader ->
        'elt Core_set.Poly.t Bin_prot.Unsafe_read_c.reader
      val bin_read_t__ :
        'elt Bin_prot.Unsafe_read_c.reader ->
        (int -> 'elt Core_set.Poly.t) Bin_prot.Unsafe_read_c.reader
      val bin_reader_t :
        'elt Bin_prot.Type_class.reader ->
        'elt Core_set.Poly.t Bin_prot.Type_class.reader
      val bin_size_t :
        'elt Bin_prot.Size.sizer -> 'elt Core_set.Poly.t Bin_prot.Size.sizer
      val bin_write_t :
        'elt Bin_prot.Unsafe_write_c.writer ->
        'elt Core_set.Poly.t Bin_prot.Write_ml.writer
      val bin_write_t_ :
        'elt Bin_prot.Unsafe_write_c.writer ->
        'elt Core_set.Poly.t Bin_prot.Unsafe_write_c.writer
      val bin_writer_t :
        'elt Bin_prot.Type_class.writer ->
        'elt Core_set.Poly.t Bin_prot.Type_class.writer
    end
  module type Elt = Core_set_intf.Elt
  module type Elt_binable = Core_set_intf.Elt_binable
  module type S =
    sig
      module Elt : Comparator.S
      module Tree :
        sig
          type t = (Elt.t, Elt.comparator) Tree.t
          val length : t -> int
          val is_empty : t -> bool
          val iter : t -> f:(Elt.t -> unit) -> unit
          val fold :
            t -> init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
          val exists : t -> f:(Elt.t -> bool) -> bool
          val for_all : t -> f:(Elt.t -> bool) -> bool
          val count : t -> f:(Elt.t -> bool) -> int
          val find : t -> f:(Elt.t -> bool) -> Elt.t option
          val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
          val to_list : t -> Elt.t list
          val to_array : t -> Elt.t array
          val invariants : t -> bool
          val mem : t -> Elt.t -> bool
          val add : t -> Elt.t -> t
          val remove : t -> Elt.t -> t
          val union : t -> t -> t
          val inter : t -> t -> t
          val diff : t -> t -> t
          val compare_direct : t -> t -> int
          val equal : t -> t -> bool
          val subset : t -> t -> bool
          val fold_until :
            t ->
            init:'->
            f:('-> Elt.t -> [ `Continue of '| `Stop of 'b ]) -> 'b
          val fold_right : t -> init:'-> f:(Elt.t -> '-> 'b) -> 'b
          val iter2 :
            t ->
            t ->
            f:([ `Both of Elt.t * Elt.t | `Left of Elt.t | `Right of Elt.t ] ->
               unit) ->
            unit
          val filter : t -> f:(Elt.t -> bool) -> t
          val partition_tf : t -> f:(Elt.t -> bool) -> t * t
          val elements : t -> Elt.t list
          val min_elt : t -> Elt.t option
          val min_elt_exn : t -> Elt.t
          val max_elt : t -> Elt.t option
          val max_elt_exn : t -> Elt.t
          val choose : t -> Elt.t option
          val choose_exn : t -> Elt.t
          val split : t -> Elt.t -> t * bool * t
          val group_by : t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
          val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
          val find_index : t -> int -> Elt.t option
          val remove_index : t -> int -> t
          val to_tree : t -> t
          val empty : t
          val singleton : Elt.t -> t
          val union_list : t list -> t
          val of_list : Elt.t list -> t
          val of_array : Elt.t array -> t
          val of_sorted_array : Elt.t array -> t Or_error.t
          val of_sorted_array_unchecked : Elt.t array -> t
          val stable_dedup_list : Elt.t list -> Elt.t list
          val map : ('a, 'b) Tree.t -> f:('-> Elt.t) -> t
          val filter_map : ('a, 'b) Tree.t -> f:('-> Elt.t option) -> t
          val of_tree : t -> t
          val t_of_sexp : Sexplib.Sexp.t -> t
          val sexp_of_t : t -> Sexplib.Sexp.t
          val compare : t -> t -> int
        end
      type t = (Elt.t, Elt.comparator) t
      val length : t -> int
      val is_empty : t -> bool
      val iter : t -> f:(Elt.t -> unit) -> unit
      val fold : t -> init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
      val exists : t -> f:(Elt.t -> bool) -> bool
      val for_all : t -> f:(Elt.t -> bool) -> bool
      val count : t -> f:(Elt.t -> bool) -> int
      val find : t -> f:(Elt.t -> bool) -> Elt.t option
      val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
      val to_list : t -> Elt.t list
      val to_array : t -> Elt.t array
      val invariants : t -> bool
      val mem : t -> Elt.t -> bool
      val add : t -> Elt.t -> t
      val remove : t -> Elt.t -> t
      val union : t -> t -> t
      val inter : t -> t -> t
      val diff : t -> t -> t
      val compare_direct : t -> t -> int
      val equal : t -> t -> bool
      val subset : t -> t -> bool
      val fold_until :
        t ->
        init:'-> f:('-> Elt.t -> [ `Continue of '| `Stop of 'b ]) -> 'b
      val fold_right : t -> init:'-> f:(Elt.t -> '-> 'b) -> 'b
      val iter2 :
        t ->
        t ->
        f:([ `Both of Elt.t * Elt.t | `Left of Elt.t | `Right of Elt.t ] ->
           unit) ->
        unit
      val filter : t -> f:(Elt.t -> bool) -> t
      val partition_tf : t -> f:(Elt.t -> bool) -> t * t
      val elements : t -> Elt.t list
      val min_elt : t -> Elt.t option
      val min_elt_exn : t -> Elt.t
      val max_elt : t -> Elt.t option
      val max_elt_exn : t -> Elt.t
      val choose : t -> Elt.t option
      val choose_exn : t -> Elt.t
      val split : t -> Elt.t -> t * bool * t
      val group_by : t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
      val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
      val find_index : t -> int -> Elt.t option
      val remove_index : t -> int -> t
      val to_tree : t -> Tree.t
      val empty : t
      val singleton : Elt.t -> t
      val union_list : t list -> t
      val of_list : Elt.t list -> t
      val of_array : Elt.t array -> t
      val of_sorted_array : Elt.t array -> t Or_error.t
      val of_sorted_array_unchecked : Elt.t array -> t
      val stable_dedup_list : Elt.t list -> Elt.t list
      val map : ('a, 'b) t -> f:('-> Elt.t) -> t
      val filter_map : ('a, 'b) t -> f:('-> Elt.t option) -> t
      val of_tree : Tree.t -> t
      val t_of_sexp : Sexplib.Sexp.t -> t
      val sexp_of_t : t -> Sexplib.Sexp.t
      val compare : t -> t -> int
    end
  module type S_binable =
    sig
      module Elt : Comparator.S
      module Tree :
        sig
          type t = (Elt.t, Elt.comparator) Tree.t
          val length : t -> int
          val is_empty : t -> bool
          val iter : t -> f:(Elt.t -> unit) -> unit
          val fold :
            t -> init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
          val exists : t -> f:(Elt.t -> bool) -> bool
          val for_all : t -> f:(Elt.t -> bool) -> bool
          val count : t -> f:(Elt.t -> bool) -> int
          val find : t -> f:(Elt.t -> bool) -> Elt.t option
          val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
          val to_list : t -> Elt.t list
          val to_array : t -> Elt.t array
          val invariants : t -> bool
          val mem : t -> Elt.t -> bool
          val add : t -> Elt.t -> t
          val remove : t -> Elt.t -> t
          val union : t -> t -> t
          val inter : t -> t -> t
          val diff : t -> t -> t
          val compare_direct : t -> t -> int
          val equal : t -> t -> bool
          val subset : t -> t -> bool
          val fold_until :
            t ->
            init:'->
            f:('-> Elt.t -> [ `Continue of '| `Stop of 'b ]) -> 'b
          val fold_right : t -> init:'-> f:(Elt.t -> '-> 'b) -> 'b
          val iter2 :
            t ->
            t ->
            f:([ `Both of Elt.t * Elt.t | `Left of Elt.t | `Right of Elt.t ] ->
               unit) ->
            unit
          val filter : t -> f:(Elt.t -> bool) -> t
          val partition_tf : t -> f:(Elt.t -> bool) -> t * t
          val elements : t -> Elt.t list
          val min_elt : t -> Elt.t option
          val min_elt_exn : t -> Elt.t
          val max_elt : t -> Elt.t option
          val max_elt_exn : t -> Elt.t
          val choose : t -> Elt.t option
          val choose_exn : t -> Elt.t
          val split : t -> Elt.t -> t * bool * t
          val group_by : t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
          val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
          val find_index : t -> int -> Elt.t option
          val remove_index : t -> int -> t
          val to_tree : t -> t
          val empty : t
          val singleton : Elt.t -> t
          val union_list : t list -> t
          val of_list : Elt.t list -> t
          val of_array : Elt.t array -> t
          val of_sorted_array : Elt.t array -> t Or_error.t
          val of_sorted_array_unchecked : Elt.t array -> t
          val stable_dedup_list : Elt.t list -> Elt.t list
          val map : ('a, 'b) Tree.t -> f:('-> Elt.t) -> t
          val filter_map : ('a, 'b) Tree.t -> f:('-> Elt.t option) -> t
          val of_tree : t -> t
          val t_of_sexp : Sexplib.Sexp.t -> t
          val sexp_of_t : t -> Sexplib.Sexp.t
          val compare : t -> t -> int
        end
      type t = (Elt.t, Elt.comparator) t
      val length : t -> int
      val is_empty : t -> bool
      val iter : t -> f:(Elt.t -> unit) -> unit
      val fold : t -> init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
      val exists : t -> f:(Elt.t -> bool) -> bool
      val for_all : t -> f:(Elt.t -> bool) -> bool
      val count : t -> f:(Elt.t -> bool) -> int
      val find : t -> f:(Elt.t -> bool) -> Elt.t option
      val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
      val to_list : t -> Elt.t list
      val to_array : t -> Elt.t array
      val invariants : t -> bool
      val mem : t -> Elt.t -> bool
      val add : t -> Elt.t -> t
      val remove : t -> Elt.t -> t
      val union : t -> t -> t
      val inter : t -> t -> t
      val diff : t -> t -> t
      val compare_direct : t -> t -> int
      val equal : t -> t -> bool
      val subset : t -> t -> bool
      val fold_until :
        t ->
        init:'-> f:('-> Elt.t -> [ `Continue of '| `Stop of 'b ]) -> 'b
      val fold_right : t -> init:'-> f:(Elt.t -> '-> 'b) -> 'b
      val iter2 :
        t ->
        t ->
        f:([ `Both of Elt.t * Elt.t | `Left of Elt.t | `Right of Elt.t ] ->
           unit) ->
        unit
      val filter : t -> f:(Elt.t -> bool) -> t
      val partition_tf : t -> f:(Elt.t -> bool) -> t * t
      val elements : t -> Elt.t list
      val min_elt : t -> Elt.t option
      val min_elt_exn : t -> Elt.t
      val max_elt : t -> Elt.t option
      val max_elt_exn : t -> Elt.t
      val choose : t -> Elt.t option
      val choose_exn : t -> Elt.t
      val split : t -> Elt.t -> t * bool * t
      val group_by : t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
      val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
      val find_index : t -> int -> Elt.t option
      val remove_index : t -> int -> t
      val to_tree : t -> Tree.t
      val empty : t
      val singleton : Elt.t -> t
      val union_list : t list -> t
      val of_list : Elt.t list -> t
      val of_array : Elt.t array -> t
      val of_sorted_array : Elt.t array -> t Or_error.t
      val of_sorted_array_unchecked : Elt.t array -> t
      val stable_dedup_list : Elt.t list -> Elt.t list
      val map : ('a, 'b) t -> f:('-> Elt.t) -> t
      val filter_map : ('a, 'b) t -> f:('-> Elt.t option) -> t
      val of_tree : Tree.t -> t
      val t_of_sexp : Sexplib.Sexp.t -> t
      val sexp_of_t : t -> Sexplib.Sexp.t
      val compare : t -> t -> int
      val bin_size_t : t Bin_prot.Size.sizer
      val bin_write_t : t Bin_prot.Map_to_safe.writer
      val bin_write_t_ : t Bin_prot.Unsafe_write_c.writer
      val bin_read_t : t Bin_prot.Read_ml.reader
      val bin_read_t_ : t Bin_prot.Unsafe_read_c.reader
      val bin_read_t__ : (int -> t) Bin_prot.Unsafe_read_c.reader
      val bin_writer_t : t Bin_prot.Type_class.writer
      val bin_reader_t : t Bin_prot.Type_class.reader
      val bin_t : t Bin_prot.Type_class.t
    end
  module Make :
    functor (Elt : Elt->
      sig
        module Elt :
          sig
            type t = Elt.t
            val compare : t -> t -> int
            val t_of_sexp : Sexplib.Sexp.t -> t
            val sexp_of_t : t -> Sexplib.Sexp.t
            type comparator
            val comparator : (t, comparator) Comparator.t_
          end
        module Tree :
          sig
            type t = (Elt.t, Elt.comparator) Tree.t
            val length : t -> int
            val is_empty : t -> bool
            val iter : t -> f:(Elt.t -> unit) -> unit
            val fold :
              t -> init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
            val exists : t -> f:(Elt.t -> bool) -> bool
            val for_all : t -> f:(Elt.t -> bool) -> bool
            val count : t -> f:(Elt.t -> bool) -> int
            val find : t -> f:(Elt.t -> bool) -> Elt.t option
            val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
            val to_list : t -> Elt.t list
            val to_array : t -> Elt.t array
            val invariants : t -> bool
            val mem : t -> Elt.t -> bool
            val add : t -> Elt.t -> t
            val remove : t -> Elt.t -> t
            val union : t -> t -> t
            val inter : t -> t -> t
            val diff : t -> t -> t
            val compare_direct : t -> t -> int
            val equal : t -> t -> bool
            val subset : t -> t -> bool
            val fold_until :
              t ->
              init:'->
              f:('-> Elt.t -> [ `Continue of '| `Stop of 'b ]) -> 'b
            val fold_right : t -> init:'-> f:(Elt.t -> '-> 'b) -> 'b
            val iter2 :
              t ->
              t ->
              f:([ `Both of Elt.t * Elt.t | `Left of Elt.t | `Right of Elt.t ] ->
                 unit) ->
              unit
            val filter : t -> f:(Elt.t -> bool) -> t
            val partition_tf : t -> f:(Elt.t -> bool) -> t * t
            val elements : t -> Elt.t list
            val min_elt : t -> Elt.t option
            val min_elt_exn : t -> Elt.t
            val max_elt : t -> Elt.t option
            val max_elt_exn : t -> Elt.t
            val choose : t -> Elt.t option
            val choose_exn : t -> Elt.t
            val split : t -> Elt.t -> t * bool * t
            val group_by : t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
            val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
            val find_index : t -> int -> Elt.t option
            val remove_index : t -> int -> t
            val to_tree : t -> t
            val empty : t
            val singleton : Elt.t -> t
            val union_list : t list -> t
            val of_list : Elt.t list -> t
            val of_array : Elt.t array -> t
            val of_sorted_array : Elt.t array -> t Or_error.t
            val of_sorted_array_unchecked : Elt.t array -> t
            val stable_dedup_list : Elt.t list -> Elt.t list
            val map : ('a, 'b) Tree.t -> f:('-> Elt.t) -> t
            val filter_map : ('a, 'b) Tree.t -> f:('-> Elt.t option) -> t
            val of_tree : t -> t
            val t_of_sexp : Sexplib.Sexp.t -> t
            val sexp_of_t : t -> Sexplib.Sexp.t
            val compare : t -> t -> int
          end
        type t = (Elt.t, Elt.comparator) t
        val length : t -> int
        val is_empty : t -> bool
        val iter : t -> f:(Elt.t -> unit) -> unit
        val fold :
          t -> init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
        val exists : t -> f:(Elt.t -> bool) -> bool
        val for_all : t -> f:(Elt.t -> bool) -> bool
        val count : t -> f:(Elt.t -> bool) -> int
        val find : t -> f:(Elt.t -> bool) -> Elt.t option
        val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
        val to_list : t -> Elt.t list
        val to_array : t -> Elt.t array
        val invariants : t -> bool
        val mem : t -> Elt.t -> bool
        val add : t -> Elt.t -> t
        val remove : t -> Elt.t -> t
        val union : t -> t -> t
        val inter : t -> t -> t
        val diff : t -> t -> t
        val compare_direct : t -> t -> int
        val equal : t -> t -> bool
        val subset : t -> t -> bool
        val fold_until :
          t ->
          init:'->
          f:('-> Elt.t -> [ `Continue of '| `Stop of 'b ]) -> 'b
        val fold_right : t -> init:'-> f:(Elt.t -> '-> 'b) -> 'b
        val iter2 :
          t ->
          t ->
          f:([ `Both of Elt.t * Elt.t | `Left of Elt.t | `Right of Elt.t ] ->
             unit) ->
          unit
        val filter : t -> f:(Elt.t -> bool) -> t
        val partition_tf : t -> f:(Elt.t -> bool) -> t * t
        val elements : t -> Elt.t list
        val min_elt : t -> Elt.t option
        val min_elt_exn : t -> Elt.t
        val max_elt : t -> Elt.t option
        val max_elt_exn : t -> Elt.t
        val choose : t -> Elt.t option
        val choose_exn : t -> Elt.t
        val split : t -> Elt.t -> t * bool * t
        val group_by : t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
        val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
        val find_index : t -> int -> Elt.t option
        val remove_index : t -> int -> t
        val to_tree : t -> Tree.t
        val empty : t
        val singleton : Elt.t -> t
        val union_list : t list -> t
        val of_list : Elt.t list -> t
        val of_array : Elt.t array -> t
        val of_sorted_array : Elt.t array -> t Or_error.t
        val of_sorted_array_unchecked : Elt.t array -> t
        val stable_dedup_list : Elt.t list -> Elt.t list
        val map : ('a, 'b) t -> f:('-> Elt.t) -> t
        val filter_map : ('a, 'b) t -> f:('-> Elt.t option) -> t
        val of_tree : Tree.t -> t
        val t_of_sexp : Sexplib.Sexp.t -> t
        val sexp_of_t : t -> Sexplib.Sexp.t
        val compare : t -> t -> int
      end
  module Make_using_comparator :
    functor (Elt : Comparator.S->
      sig
        module Elt :
          sig
            type t = Elt.t
            val compare : t -> t -> int
            val t_of_sexp : Sexplib.Sexp.t -> t
            val sexp_of_t : t -> Sexplib.Sexp.t
            type comparator = Elt.comparator
            val comparator : (t, comparator) Comparator.t_
          end
        module Tree :
          sig
            type t = (Elt.t, Elt.comparator) Tree.t
            val length : t -> int
            val is_empty : t -> bool
            val iter : t -> f:(Elt.t -> unit) -> unit
            val fold :
              t -> init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
            val exists : t -> f:(Elt.t -> bool) -> bool
            val for_all : t -> f:(Elt.t -> bool) -> bool
            val count : t -> f:(Elt.t -> bool) -> int
            val find : t -> f:(Elt.t -> bool) -> Elt.t option
            val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
            val to_list : t -> Elt.t list
            val to_array : t -> Elt.t array
            val invariants : t -> bool
            val mem : t -> Elt.t -> bool
            val add : t -> Elt.t -> t
            val remove : t -> Elt.t -> t
            val union : t -> t -> t
            val inter : t -> t -> t
            val diff : t -> t -> t
            val compare_direct : t -> t -> int
            val equal : t -> t -> bool
            val subset : t -> t -> bool
            val fold_until :
              t ->
              init:'->
              f:('-> Elt.t -> [ `Continue of '| `Stop of 'b ]) -> 'b
            val fold_right : t -> init:'-> f:(Elt.t -> '-> 'b) -> 'b
            val iter2 :
              t ->
              t ->
              f:([ `Both of Elt.t * Elt.t | `Left of Elt.t | `Right of Elt.t ] ->
                 unit) ->
              unit
            val filter : t -> f:(Elt.t -> bool) -> t
            val partition_tf : t -> f:(Elt.t -> bool) -> t * t
            val elements : t -> Elt.t list
            val min_elt : t -> Elt.t option
            val min_elt_exn : t -> Elt.t
            val max_elt : t -> Elt.t option
            val max_elt_exn : t -> Elt.t
            val choose : t -> Elt.t option
            val choose_exn : t -> Elt.t
            val split : t -> Elt.t -> t * bool * t
            val group_by : t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
            val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
            val find_index : t -> int -> Elt.t option
            val remove_index : t -> int -> t
            val to_tree : t -> t
            val empty : t
            val singleton : Elt.t -> t
            val union_list : t list -> t
            val of_list : Elt.t list -> t
            val of_array : Elt.t array -> t
            val of_sorted_array : Elt.t array -> t Or_error.t
            val of_sorted_array_unchecked : Elt.t array -> t
            val stable_dedup_list : Elt.t list -> Elt.t list
            val map : ('a, 'b) Tree.t -> f:('-> Elt.t) -> t
            val filter_map : ('a, 'b) Tree.t -> f:('-> Elt.t option) -> t
            val of_tree : t -> t
            val t_of_sexp : Sexplib.Sexp.t -> t
            val sexp_of_t : t -> Sexplib.Sexp.t
            val compare : t -> t -> int
          end
        type t = (Elt.t, Elt.comparator) t
        val length : t -> int
        val is_empty : t -> bool
        val iter : t -> f:(Elt.t -> unit) -> unit
        val fold :
          t -> init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
        val exists : t -> f:(Elt.t -> bool) -> bool
        val for_all : t -> f:(Elt.t -> bool) -> bool
        val count : t -> f:(Elt.t -> bool) -> int
        val find : t -> f:(Elt.t -> bool) -> Elt.t option
        val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
        val to_list : t -> Elt.t list
        val to_array : t -> Elt.t array
        val invariants : t -> bool
        val mem : t -> Elt.t -> bool
        val add : t -> Elt.t -> t
        val remove : t -> Elt.t -> t
        val union : t -> t -> t
        val inter : t -> t -> t
        val diff : t -> t -> t
        val compare_direct : t -> t -> int
        val equal : t -> t -> bool
        val subset : t -> t -> bool
        val fold_until :
          t ->
          init:'->
          f:('-> Elt.t -> [ `Continue of '| `Stop of 'b ]) -> 'b
        val fold_right : t -> init:'-> f:(Elt.t -> '-> 'b) -> 'b
        val iter2 :
          t ->
          t ->
          f:([ `Both of Elt.t * Elt.t | `Left of Elt.t | `Right of Elt.t ] ->
             unit) ->
          unit
        val filter : t -> f:(Elt.t -> bool) -> t
        val partition_tf : t -> f:(Elt.t -> bool) -> t * t
        val elements : t -> Elt.t list
        val min_elt : t -> Elt.t option
        val min_elt_exn : t -> Elt.t
        val max_elt : t -> Elt.t option
        val max_elt_exn : t -> Elt.t
        val choose : t -> Elt.t option
        val choose_exn : t -> Elt.t
        val split : t -> Elt.t -> t * bool * t
        val group_by : t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
        val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
        val find_index : t -> int -> Elt.t option
        val remove_index : t -> int -> t
        val to_tree : t -> Tree.t
        val empty : t
        val singleton : Elt.t -> t
        val union_list : t list -> t
        val of_list : Elt.t list -> t
        val of_array : Elt.t array -> t
        val of_sorted_array : Elt.t array -> t Or_error.t
        val of_sorted_array_unchecked : Elt.t array -> t
        val stable_dedup_list : Elt.t list -> Elt.t list
        val map : ('a, 'b) t -> f:('-> Elt.t) -> t
        val filter_map : ('a, 'b) t -> f:('-> Elt.t option) -> t
        val of_tree : Tree.t -> t
        val t_of_sexp : Sexplib.Sexp.t -> t
        val sexp_of_t : t -> Sexplib.Sexp.t
        val compare : t -> t -> int
      end
  module Make_binable :
    functor (Elt : Elt_binable->
      sig
        module Elt :
          sig
            type t = Elt.t
            val compare : t -> t -> int
            val t_of_sexp : Sexplib.Sexp.t -> t
            val sexp_of_t : t -> Sexplib.Sexp.t
            type comparator
            val comparator : (t, comparator) Comparator.t_
          end
        module Tree :
          sig
            type t = (Elt.t, Elt.comparator) Tree.t
            val length : t -> int
            val is_empty : t -> bool
            val iter : t -> f:(Elt.t -> unit) -> unit
            val fold :
              t -> init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
            val exists : t -> f:(Elt.t -> bool) -> bool
            val for_all : t -> f:(Elt.t -> bool) -> bool
            val count : t -> f:(Elt.t -> bool) -> int
            val find : t -> f:(Elt.t -> bool) -> Elt.t option
            val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
            val to_list : t -> Elt.t list
            val to_array : t -> Elt.t array
            val invariants : t -> bool
            val mem : t -> Elt.t -> bool
            val add : t -> Elt.t -> t
            val remove : t -> Elt.t -> t
            val union : t -> t -> t
            val inter : t -> t -> t
            val diff : t -> t -> t
            val compare_direct : t -> t -> int
            val equal : t -> t -> bool
            val subset : t -> t -> bool
            val fold_until :
              t ->
              init:'->
              f:('-> Elt.t -> [ `Continue of '| `Stop of 'b ]) -> 'b
            val fold_right : t -> init:'-> f:(Elt.t -> '-> 'b) -> 'b
            val iter2 :
              t ->
              t ->
              f:([ `Both of Elt.t * Elt.t | `Left of Elt.t | `Right of Elt.t ] ->
                 unit) ->
              unit
            val filter : t -> f:(Elt.t -> bool) -> t
            val partition_tf : t -> f:(Elt.t -> bool) -> t * t
            val elements : t -> Elt.t list
            val min_elt : t -> Elt.t option
            val min_elt_exn : t -> Elt.t
            val max_elt : t -> Elt.t option
            val max_elt_exn : t -> Elt.t
            val choose : t -> Elt.t option
            val choose_exn : t -> Elt.t
            val split : t -> Elt.t -> t * bool * t
            val group_by : t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
            val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
            val find_index : t -> int -> Elt.t option
            val remove_index : t -> int -> t
            val to_tree : t -> t
            val empty : t
            val singleton : Elt.t -> t
            val union_list : t list -> t
            val of_list : Elt.t list -> t
            val of_array : Elt.t array -> t
            val of_sorted_array : Elt.t array -> t Or_error.t
            val of_sorted_array_unchecked : Elt.t array -> t
            val stable_dedup_list : Elt.t list -> Elt.t list
            val map : ('a, 'b) Tree.t -> f:('-> Elt.t) -> t
            val filter_map : ('a, 'b) Tree.t -> f:('-> Elt.t option) -> t
            val of_tree : t -> t
            val t_of_sexp : Sexplib.Sexp.t -> t
            val sexp_of_t : t -> Sexplib.Sexp.t
            val compare : t -> t -> int
          end
        type t = (Elt.t, Elt.comparator) t
        val length : t -> int
        val is_empty : t -> bool
        val iter : t -> f:(Elt.t -> unit) -> unit
        val fold :
          t -> init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
        val exists : t -> f:(Elt.t -> bool) -> bool
        val for_all : t -> f:(Elt.t -> bool) -> bool
        val count : t -> f:(Elt.t -> bool) -> int
        val find : t -> f:(Elt.t -> bool) -> Elt.t option
        val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
        val to_list : t -> Elt.t list
        val to_array : t -> Elt.t array
        val invariants : t -> bool
        val mem : t -> Elt.t -> bool
        val add : t -> Elt.t -> t
        val remove : t -> Elt.t -> t
        val union : t -> t -> t
        val inter : t -> t -> t
        val diff : t -> t -> t
        val compare_direct : t -> t -> int
        val equal : t -> t -> bool
        val subset : t -> t -> bool
        val fold_until :
          t ->
          init:'->
          f:('-> Elt.t -> [ `Continue of '| `Stop of 'b ]) -> 'b
        val fold_right : t -> init:'-> f:(Elt.t -> '-> 'b) -> 'b
        val iter2 :
          t ->
          t ->
          f:([ `Both of Elt.t * Elt.t | `Left of Elt.t | `Right of Elt.t ] ->
             unit) ->
          unit
        val filter : t -> f:(Elt.t -> bool) -> t
        val partition_tf : t -> f:(Elt.t -> bool) -> t * t
        val elements : t -> Elt.t list
        val min_elt : t -> Elt.t option
        val min_elt_exn : t -> Elt.t
        val max_elt : t -> Elt.t option
        val max_elt_exn : t -> Elt.t
        val choose : t -> Elt.t option
        val choose_exn : t -> Elt.t
        val split : t -> Elt.t -> t * bool * t
        val group_by : t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
        val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
        val find_index : t -> int -> Elt.t option
        val remove_index : t -> int -> t
        val to_tree : t -> Tree.t
        val empty : t
        val singleton : Elt.t -> t
        val union_list : t list -> t
        val of_list : Elt.t list -> t
        val of_array : Elt.t array -> t
        val of_sorted_array : Elt.t array -> t Or_error.t
        val of_sorted_array_unchecked : Elt.t array -> t
        val stable_dedup_list : Elt.t list -> Elt.t list
        val map : ('a, 'b) t -> f:('-> Elt.t) -> t
        val filter_map : ('a, 'b) t -> f:('-> Elt.t option) -> t
        val of_tree : Tree.t -> t
        val t_of_sexp : Sexplib.Sexp.t -> t
        val sexp_of_t : t -> Sexplib.Sexp.t
        val compare : t -> t -> int
        val bin_size_t : t Bin_prot.Size.sizer
        val bin_write_t : t Bin_prot.Map_to_safe.writer
        val bin_write_t_ : t Bin_prot.Unsafe_write_c.writer
        val bin_read_t : t Bin_prot.Read_ml.reader
        val bin_read_t_ : t Bin_prot.Unsafe_read_c.reader
        val bin_read_t__ : (int -> t) Bin_prot.Unsafe_read_c.reader
        val bin_writer_t : t Bin_prot.Type_class.writer
        val bin_reader_t : t Bin_prot.Type_class.reader
        val bin_t : t Bin_prot.Type_class.t
      end
  module Make_binable_using_comparator :
    functor (Elt : Comparator.S_binable->
      sig
        module Elt :
          sig
            type t = Elt.t
            val compare : t -> t -> int
            val t_of_sexp : Sexplib.Sexp.t -> t
            val sexp_of_t : t -> Sexplib.Sexp.t
            type comparator = Elt.comparator
            val comparator : (t, comparator) Comparator.t_
          end
        module Tree :
          sig
            type t = (Elt.t, Elt.comparator) Tree.t
            val length : t -> int
            val is_empty : t -> bool
            val iter : t -> f:(Elt.t -> unit) -> unit
            val fold :
              t -> init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
            val exists : t -> f:(Elt.t -> bool) -> bool
            val for_all : t -> f:(Elt.t -> bool) -> bool
            val count : t -> f:(Elt.t -> bool) -> int
            val find : t -> f:(Elt.t -> bool) -> Elt.t option
            val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
            val to_list : t -> Elt.t list
            val to_array : t -> Elt.t array
            val invariants : t -> bool
            val mem : t -> Elt.t -> bool
            val add : t -> Elt.t -> t
            val remove : t -> Elt.t -> t
            val union : t -> t -> t
            val inter : t -> t -> t
            val diff : t -> t -> t
            val compare_direct : t -> t -> int
            val equal : t -> t -> bool
            val subset : t -> t -> bool
            val fold_until :
              t ->
              init:'->
              f:('-> Elt.t -> [ `Continue of '| `Stop of 'b ]) -> 'b
            val fold_right : t -> init:'-> f:(Elt.t -> '-> 'b) -> 'b
            val iter2 :
              t ->
              t ->
              f:([ `Both of Elt.t * Elt.t | `Left of Elt.t | `Right of Elt.t ] ->
                 unit) ->
              unit
            val filter : t -> f:(Elt.t -> bool) -> t
            val partition_tf : t -> f:(Elt.t -> bool) -> t * t
            val elements : t -> Elt.t list
            val min_elt : t -> Elt.t option
            val min_elt_exn : t -> Elt.t
            val max_elt : t -> Elt.t option
            val max_elt_exn : t -> Elt.t
            val choose : t -> Elt.t option
            val choose_exn : t -> Elt.t
            val split : t -> Elt.t -> t * bool * t
            val group_by : t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
            val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
            val find_index : t -> int -> Elt.t option
            val remove_index : t -> int -> t
            val to_tree : t -> t
            val empty : t
            val singleton : Elt.t -> t
            val union_list : t list -> t
            val of_list : Elt.t list -> t
            val of_array : Elt.t array -> t
            val of_sorted_array : Elt.t array -> t Or_error.t
            val of_sorted_array_unchecked : Elt.t array -> t
            val stable_dedup_list : Elt.t list -> Elt.t list
            val map : ('a, 'b) Tree.t -> f:('-> Elt.t) -> t
            val filter_map : ('a, 'b) Tree.t -> f:('-> Elt.t option) -> t
            val of_tree : t -> t
            val t_of_sexp : Sexplib.Sexp.t -> t
            val sexp_of_t : t -> Sexplib.Sexp.t
            val compare : t -> t -> int
          end
        type t = (Elt.t, Elt.comparator) t
        val length : t -> int
        val is_empty : t -> bool
        val iter : t -> f:(Elt.t -> unit) -> unit
        val fold :
          t -> init:'accum -> f:('accum -> Elt.t -> 'accum) -> 'accum
        val exists : t -> f:(Elt.t -> bool) -> bool
        val for_all : t -> f:(Elt.t -> bool) -> bool
        val count : t -> f:(Elt.t -> bool) -> int
        val find : t -> f:(Elt.t -> bool) -> Elt.t option
        val find_map : t -> f:(Elt.t -> 'a option) -> 'a option
        val to_list : t -> Elt.t list
        val to_array : t -> Elt.t array
        val invariants : t -> bool
        val mem : t -> Elt.t -> bool
        val add : t -> Elt.t -> t
        val remove : t -> Elt.t -> t
        val union : t -> t -> t
        val inter : t -> t -> t
        val diff : t -> t -> t
        val compare_direct : t -> t -> int
        val equal : t -> t -> bool
        val subset : t -> t -> bool
        val fold_until :
          t ->
          init:'->
          f:('-> Elt.t -> [ `Continue of '| `Stop of 'b ]) -> 'b
        val fold_right : t -> init:'-> f:(Elt.t -> '-> 'b) -> 'b
        val iter2 :
          t ->
          t ->
          f:([ `Both of Elt.t * Elt.t | `Left of Elt.t | `Right of Elt.t ] ->
             unit) ->
          unit
        val filter : t -> f:(Elt.t -> bool) -> t
        val partition_tf : t -> f:(Elt.t -> bool) -> t * t
        val elements : t -> Elt.t list
        val min_elt : t -> Elt.t option
        val min_elt_exn : t -> Elt.t
        val max_elt : t -> Elt.t option
        val max_elt_exn : t -> Elt.t
        val choose : t -> Elt.t option
        val choose_exn : t -> Elt.t
        val split : t -> Elt.t -> t * bool * t
        val group_by : t -> equiv:(Elt.t -> Elt.t -> bool) -> t list
        val find_exn : t -> f:(Elt.t -> bool) -> Elt.t
        val find_index : t -> int -> Elt.t option
        val remove_index : t -> int -> t
        val to_tree : t -> Tree.t
        val empty : t
        val singleton : Elt.t -> t
        val union_list : t list -> t
        val of_list : Elt.t list -> t
        val of_array : Elt.t array -> t
        val of_sorted_array : Elt.t array -> t Or_error.t
        val of_sorted_array_unchecked : Elt.t array -> t
        val stable_dedup_list : Elt.t list -> Elt.t list
        val map : ('a, 'b) t -> f:('-> Elt.t) -> t
        val filter_map : ('a, 'b) t -> f:('-> Elt.t option) -> t
        val of_tree : Tree.t -> t
        val t_of_sexp : Sexplib.Sexp.t -> t
        val sexp_of_t : t -> Sexplib.Sexp.t
        val compare : t -> t -> int
        val bin_size_t : t Bin_prot.Size.sizer
        val bin_write_t : t Bin_prot.Map_to_safe.writer
        val bin_write_t_ : t Bin_prot.Unsafe_write_c.writer
        val bin_read_t : t Bin_prot.Read_ml.reader
        val bin_read_t_ : t Bin_prot.Unsafe_read_c.reader
        val bin_read_t__ : (int -> t) Bin_prot.Unsafe_read_c.reader
        val bin_writer_t : t Bin_prot.Type_class.writer
        val bin_reader_t : t Bin_prot.Type_class.reader
        val bin_t : t Bin_prot.Type_class.t
      end
  val compare :
    ('elt -> 'elt -> int) ->
    ('cmp -> 'cmp -> int) ->
    ('elt, 'cmp) Core_set.t -> ('elt, 'cmp) Core_set.t -> int
end