sig
  type 'a t
  val mem : ?equal:('a -> 'a -> bool) -> 'a t -> 'a -> bool
  val length : 'a t -> int
  val is_empty : 'a t -> bool
  val iter : 'a t -> f:('a -> unit) -> unit
  val fold : 'a t -> init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
  val exists : 'a t -> f:('a -> bool) -> bool
  val for_all : 'a t -> f:('a -> bool) -> bool
  val count : 'a t -> f:('a -> bool) -> int
  val sum :
    (module Commutative_group.S with type t = 'sum) ->
    'a t -> f:('a -> 'sum) -> 'sum
  val find : 'a t -> f:('a -> bool) -> 'a option
  val find_map : 'a t -> f:('a -> 'b option) -> 'b option
  val to_list : 'a t -> 'a list
  val to_array : 'a t -> 'a array
  val min_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
  val max_elt : 'a t -> cmp:('a -> 'a -> int) -> 'a option
  val create : ?min_size:int -> cmp:('a -> 'a -> int) -> unit -> 'a t
  val of_array : 'a array -> cmp:('a -> 'a -> int) -> 'a t
  val of_list : 'a list -> cmp:('a -> 'a -> int) -> 'a t
  val top : 'a t -> 'a option
  val top_exn : 'a t -> 'a
  val add : 'a t -> 'a -> unit
  val remove_top : 'a t -> unit
  val pop : 'a t -> 'a option
  val pop_exn : 'a t -> 'a
  val pop_if : 'a t -> ('a -> bool) -> 'a option
  val copy : 'a t -> 'a t
  val sexp_of_t : ('a -> Sexplib.Sexp.t) -> 'a t -> Sexplib.Sexp.t
  module Elt :
    sig
      type 'a t
      val value_exn : 'a Heap.Removable.Elt.t -> 'a
      val sexp_of_t :
        ('a -> Sexplib.Sexp.t) -> 'a Heap.Removable.Elt.t -> Sexplib.Sexp.t
    end
  val add_removable : 'a t -> 'a -> 'a Heap.Removable.Elt.t
  val remove : 'a t -> 'a Heap.Removable.Elt.t -> unit
  val update :
    'a t -> 'a Heap.Removable.Elt.t -> 'a -> 'a Heap.Removable.Elt.t
  val find_elt : 'a t -> f:('a -> bool) -> 'a Heap.Removable.Elt.t option
end