ocaml-core / base / core / lib / hash_set_intf.ml

module type Accessors = sig
  include Container.Generic

  val mem : 'a t -> 'a -> bool (* override from [Container.S1.mem] *)
  val copy : 'a t -> 'a t                 (* preserves the equality function *)
  val add               : 'a t -> 'a -> unit
  val strict_add        : 'a t -> 'a -> unit Or_error.t
  val strict_add_exn    : 'a t -> 'a -> unit
  val remove            : 'a t -> 'a -> unit
  val strict_remove     : 'a t -> 'a -> unit Or_error.t
  val strict_remove_exn : 'a t -> 'a -> unit
  val clear : 'a t -> unit
  val equal : 'a t -> 'a t -> bool
  val filter : 'a t -> f:('a -> bool) -> 'a t
  val diff : 'a t -> 'a t -> 'a t
  val of_hashtbl_keys : ('a, _) Core_hashtbl.t -> 'a t
  val filter_inplace : 'a t -> f:('a -> bool) -> unit

type ('key, 'z) create_options_without_hashable =
  ('key, 'z) Core_hashtbl_intf.create_options_without_hashable

type ('key, 'z) create_options_with_hashable_required =
  ('key, 'z) Core_hashtbl_intf.create_options_with_hashable_required

module type Creators = sig
  type 'a t
  type 'a elt
  type ('a, 'z) create_options

  val create  : ('a, unit        -> 'a t) create_options
  val of_list : ('a, 'a elt list -> 'a t) create_options

module type S = sig
  type elt
  type 'a hash_set
  type t = elt hash_set with sexp
  type 'a t_ = t
  type 'a elt_ = elt

  include Creators
    with type 'a t := 'a t_
    with type 'a elt := 'a elt_
    with type ('a, 'z) create_options := ('a, 'z) create_options_without_hashable

module type S_binable = sig
  include S
  include Binable.S with type t := t
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.