sig
  module Key :
    sig
      type t = hashable
      val equal : t -> t -> bool
      val hash : t -> int
      val sexp_of_t : t -> Sexplib.Sexp.t
      val t_of_sexp : Sexplib.Sexp.t -> t
    end
  type 'a t
  type 'a container = 'a t
  val length : 'a container -> int
  val is_empty : 'a container -> bool
  val iter : 'a container -> f:('-> unit) -> unit
  val fold : 'a container -> init:'-> f:('-> '-> 'b) -> 'b
  val exists : 'a container -> f:('-> bool) -> bool
  val for_all : 'a container -> f:('-> bool) -> bool
  val find : 'a container -> f:('-> bool) -> 'a option
  val to_list : 'a container -> 'a list
  val to_array : 'a container -> 'a array
  val invariant : 'a t -> unit
  val create : unit -> 'a t
  val clear : 'a t -> unit
  val mem : 'a t -> Key.t -> bool
  val find_opt : 'a t -> Key.t -> 'a option
  val enqueue : 'a t -> Key.t -> '-> [ `Key_already_present | `Ok ]
  val dequeue : 'a t -> 'a option
  val dequeue_with_key : 'a t -> (Key.t * 'a) option
  val dequeue_all : 'a t -> f:('-> unit) -> unit
  val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
  val replace : 'a t -> Key.t -> '-> [ `No_such_key | `Ok ]
  val iter_keys : 'a t -> f:(key:Key.t -> data:'-> unit) -> unit
  val fold_keys :
    'a t -> init:'-> f:('-> key:Key.t -> data:'-> 'b) -> 'b
end