package stdcompat

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Stdcompat.HashtblSource

Sourcetype (!'a, !'b) t = ('a, 'b) Hashtbl.t

Alias for Hashtbl.t

Sourcetype statistics = Hashtbl.statistics = {
  1. num_bindings : int;
  2. num_buckets : int;
  3. max_bucket_length : int;
  4. bucket_histogram : int array;
}
  • since 4.00.0:

type statistics = num_bindings: int ; num_buckets: int ; max_bucket_length: int ; bucket_histogram: int array

Sourcemodule type HashedType = sig ... end
Sourcemodule type S = sig ... end
  • since 5.1.0:

module type S = sig type key type !'a t val create : int -> 'a t val clear : 'a t -> unit val reset : 'a t -> unit val copy : 'a t -> 'a t val add : 'a t -> key -> 'a -> unit val remove : 'a t -> key -> unit val find : 'a t -> key -> 'a val find_opt : 'a t -> key -> 'a option val find_all : 'a t -> key -> 'a list val replace : 'a t -> key -> 'a -> unit val mem : 'a t -> key -> bool val iter : (key -> 'a -> unit) -> 'a t -> unit val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc val length : 'a t -> int val stats : 'a t -> statistics val to_seq : 'a t -> (key * 'a) Seq.t val to_seq_keys : 'a t -> key Seq.t val to_seq_values : 'a t -> 'a Seq.t val add_seq : 'a t -> (key * 'a) Seq.t -> unit val replace_seq : 'a t -> (key * 'a) Seq.t -> unit val of_seq : (key * 'a) Seq.t -> 'a t end

  • since 4.07.0:

module type S = sig type key type !'a t val create : int -> 'a t val clear : 'a t -> unit val reset : 'a t -> unit val copy : 'a t -> 'a t val add : 'a t -> key -> 'a -> unit val remove : 'a t -> key -> unit val find : 'a t -> key -> 'a val find_opt : 'a t -> key -> 'a option val find_all : 'a t -> key -> 'a list val replace : 'a t -> key -> 'a -> unit val mem : 'a t -> key -> bool val iter : (key -> 'a -> unit) -> 'a t -> unit val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b val length : 'a t -> int val stats : 'a t -> statistics val to_seq : 'a t -> (key * 'a) Seq.t val to_seq_keys : 'a t -> key Seq.t val to_seq_values : 'a t -> 'a Seq.t val add_seq : 'a t -> (key * 'a) Seq.t -> unit val replace_seq : 'a t -> (key * 'a) Seq.t -> unit val of_seq : (key * 'a) Seq.t -> 'a t end

Sourcemodule Make = Hashtbl.Make
  • since 4.07.0: module Make = Hashtbl.Make
Sourcemodule type SeededHashedType = sig ... end
  • since 5.0.0:

module type SeededHashedType = sig type t val equal : t -> t -> bool val seeded_hash : int -> t -> int end

Sourcemodule type SeededS = sig ... end
  • since 5.1.0:

module type SeededS = sig type key type !'a t val create : ?random:bool -> int -> 'a t val clear : 'a t -> unit val reset : 'a t -> unit val copy : 'a t -> 'a t val add : 'a t -> key -> 'a -> unit val remove : 'a t -> key -> unit val find : 'a t -> key -> 'a val find_opt : 'a t -> key -> 'a option val find_all : 'a t -> key -> 'a list val replace : 'a t -> key -> 'a -> unit val mem : 'a t -> key -> bool val iter : (key -> 'a -> unit) -> 'a t -> unit val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit val fold : (key -> 'a -> 'acc -> 'acc) -> 'a t -> 'acc -> 'acc val length : 'a t -> int val stats : 'a t -> statistics val to_seq : 'a t -> (key * 'a) Seq.t val to_seq_keys : 'a t -> key Seq.t val to_seq_values : 'a t -> 'a Seq.t val add_seq : 'a t -> (key * 'a) Seq.t -> unit val replace_seq : 'a t -> (key * 'a) Seq.t -> unit val of_seq : (key * 'a) Seq.t -> 'a t end

  • since 4.07.0:

module type SeededS = sig type key type !'a t val create : ?random:bool -> int -> 'a t val clear : 'a t -> unit val reset : 'a t -> unit val copy : 'a t -> 'a t val add : 'a t -> key -> 'a -> unit val remove : 'a t -> key -> unit val find : 'a t -> key -> 'a val find_opt : 'a t -> key -> 'a option val find_all : 'a t -> key -> 'a list val replace : 'a t -> key -> 'a -> unit val mem : 'a t -> key -> bool val iter : (key -> 'a -> unit) -> 'a t -> unit val filter_map_inplace : (key -> 'a -> 'a option) -> 'a t -> unit val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b val length : 'a t -> int val stats : 'a t -> statistics val to_seq : 'a t -> (key * 'a) Seq.t val to_seq_keys : 'a t -> key Seq.t val to_seq_values : 'a t -> 'a Seq.t val add_seq : 'a t -> (key * 'a) Seq.t -> unit val replace_seq : 'a t -> (key * 'a) Seq.t -> unit val of_seq : (key * 'a) Seq.t -> 'a t end

Sourcemodule MakeSeeded (H : SeededHashedType) : sig ... end
  • since 5.0.0: module MakeSeeded = Hashtbl.MakeSeeded
Sourceval rebuild : ?random:bool -> ('a, 'b) t -> ('a, 'b) t
  • since 4.12.0: val rebuild : ?random:bool -> ('a, 'b) t -> ('a, 'b) t
Sourceval to_seq : ('a, 'b) t -> ('a * 'b) Seq.t
  • since 4.07.0: val to_seq : ('a, 'b) t -> ('a * 'b) Seq.t
Sourceval to_seq_keys : ('a, 'b) t -> 'a Seq.t
  • since 4.07.0: val to_seq_keys : ('a, 'b) t -> 'a Seq.t
Sourceval to_seq_values : ('a, 'b) t -> 'b Seq.t
  • since 4.07.0: val to_seq_values : ('a, 'b) t -> 'b Seq.t
Sourceval add_seq : ('a, 'b) t -> ('a * 'b) Seq.t -> unit
  • since 4.07.0: val add_seq : ('a, 'b) t -> ('a * 'b) Seq.t -> unit
Sourceval replace_seq : ('a, 'b) t -> ('a * 'b) Seq.t -> unit
  • since 4.07.0: val replace_seq : ('a, 'b) t -> ('a * 'b) Seq.t -> unit
Sourceval of_seq : ('a * 'b) Seq.t -> ('a, 'b) t
  • since 4.07.0: val of_seq : ('a * 'b) Seq.t -> ('a, 'b) t
Sourceval find_opt : ('a, 'b) t -> 'a -> 'b option
  • since 4.05.0: val find_opt : ('a, 'b) t -> 'a -> 'b option
Sourceval filter_map_inplace : ('a -> 'b -> 'b option) -> ('a, 'b) t -> unit
  • since 4.03.0:

val filter_map_inplace : ('a -> 'b -> 'b option) -> ('a, 'b) t -> unit

Sourceval is_randomized : unit -> bool
  • since 4.03.0: val is_randomized : unit -> bool
Sourceval create : ?random:bool -> int -> ('a, 'b) t
  • since 4.00.0: val create : ?random:bool -> int -> ('a, 'b) t
Sourceval reset : ('a, 'b) t -> unit
  • since 4.00.0: val reset : ('a, 'b) t -> unit
Sourceval randomize : unit -> unit
  • since 4.00.0: val randomize : unit -> unit
Sourceval stats : ('a, 'b) t -> statistics
  • since 4.00.0: val stats : ('a, 'b) t -> statistics
Sourceval seeded_hash : int -> 'a -> int
  • since 4.00.0: val seeded_hash : int -> 'a -> int
Sourceval seeded_hash_param : int -> int -> int -> 'a -> int
  • since 4.00.0: val seeded_hash_param : int -> int -> int -> 'a -> int
Sourceval length : ('a, 'b) t -> int
  • since 3.08.0: val length : ('a, 'b) t -> int
Sourceval clear : ('a, 'b) t -> unit

Alias for Hashtbl.clear

Sourceval copy : ('a, 'b) t -> ('a, 'b) t

Alias for Hashtbl.copy

Sourceval add : ('a, 'b) t -> 'a -> 'b -> unit

Alias for Hashtbl.add

Sourceval find : ('a, 'b) t -> 'a -> 'b

Alias for Hashtbl.find

Sourceval find_all : ('a, 'b) t -> 'a -> 'b list
Sourceval mem : ('a, 'b) t -> 'a -> bool

Alias for Hashtbl.mem

Sourceval remove : ('a, 'b) t -> 'a -> unit

Alias for Hashtbl.remove

Sourceval replace : ('a, 'b) t -> 'a -> 'b -> unit

Alias for Hashtbl.replace

Sourceval iter : ('a -> 'b -> unit) -> ('a, 'b) t -> unit

Alias for Hashtbl.iter

Sourceval fold : ('a -> 'b -> 'c -> 'c) -> ('a, 'b) t -> 'c -> 'c
  • since 5.1.0:

val fold : ('a -> 'b -> 'acc -> 'acc) -> ('a, 'b) t -> 'acc -> 'acc

  • since 3.07.0: val fold : ('a -> 'b -> 'c -> 'c) -> ('a, 'b) t -> 'c -> 'c
Sourceval hash : 'a -> int

Alias for Hashtbl.hash

Sourceval hash_param : int -> int -> 'a -> int
  • since 4.00.0: val hash_param : int -> int -> 'a -> int
  • since 3.08.0:

external hash_param : int -> int -> 'a -> int = "caml_hash_univ_param" "noalloc"

  • since 3.07.0:

external hash_param : int -> int -> 'a -> int = "hash_univ_param" "noalloc"

OCaml

Innovation. Community. Security.