sig
type 'a sequence = ('a -> unit) -> unit
type 'a gen = unit -> 'a option
type 'a printer = Format.formatter -> 'a -> unit
type 'a ktree = unit -> [ `Nil | `Node of 'a * 'a CCHashTrie.ktree list ]
module Transient :
sig
type t
val create : unit -> CCHashTrie.Transient.t
val equal : CCHashTrie.Transient.t -> CCHashTrie.Transient.t -> bool
val frozen : CCHashTrie.Transient.t -> bool
val active : CCHashTrie.Transient.t -> bool
val freeze : CCHashTrie.Transient.t -> unit
val with_ : (CCHashTrie.Transient.t -> 'a) -> 'a
exception Frozen
end
module type S =
sig
type key
type 'a t
val empty : 'a CCHashTrie.S.t
val is_empty : 'a CCHashTrie.S.t -> bool
val singleton : CCHashTrie.S.key -> 'a -> 'a CCHashTrie.S.t
val add :
CCHashTrie.S.key -> 'a -> 'a CCHashTrie.S.t -> 'a CCHashTrie.S.t
val mem : CCHashTrie.S.key -> 'a CCHashTrie.S.t -> bool
val get : CCHashTrie.S.key -> 'a CCHashTrie.S.t -> 'a option
val get_exn : CCHashTrie.S.key -> 'a CCHashTrie.S.t -> 'a
val remove : CCHashTrie.S.key -> 'a CCHashTrie.S.t -> 'a CCHashTrie.S.t
val update :
CCHashTrie.S.key ->
f:('a option -> 'a option) -> 'a CCHashTrie.S.t -> 'a CCHashTrie.S.t
val add_mut :
id:CCHashTrie.Transient.t ->
CCHashTrie.S.key -> 'a -> 'a CCHashTrie.S.t -> 'a CCHashTrie.S.t
val remove_mut :
id:CCHashTrie.Transient.t ->
CCHashTrie.S.key -> 'a CCHashTrie.S.t -> 'a CCHashTrie.S.t
val update_mut :
id:CCHashTrie.Transient.t ->
CCHashTrie.S.key ->
f:('a option -> 'a option) -> 'a CCHashTrie.S.t -> 'a CCHashTrie.S.t
val cardinal : 'a CCHashTrie.S.t -> int
val choose : 'a CCHashTrie.S.t -> (CCHashTrie.S.key * 'a) option
val choose_exn : 'a CCHashTrie.S.t -> CCHashTrie.S.key * 'a
val iter :
f:(CCHashTrie.S.key -> 'a -> unit) -> 'a CCHashTrie.S.t -> unit
val fold :
f:('b -> CCHashTrie.S.key -> 'a -> 'b) ->
x:'b -> 'a CCHashTrie.S.t -> 'b
val to_list : 'a CCHashTrie.S.t -> (CCHashTrie.S.key * 'a) list
val add_list :
'a CCHashTrie.S.t ->
(CCHashTrie.S.key * 'a) list -> 'a CCHashTrie.S.t
val add_list_mut :
id:CCHashTrie.Transient.t ->
'a CCHashTrie.S.t ->
(CCHashTrie.S.key * 'a) list -> 'a CCHashTrie.S.t
val of_list : (CCHashTrie.S.key * 'a) list -> 'a CCHashTrie.S.t
val add_seq :
'a CCHashTrie.S.t ->
(CCHashTrie.S.key * 'a) CCHashTrie.sequence -> 'a CCHashTrie.S.t
val add_seq_mut :
id:CCHashTrie.Transient.t ->
'a CCHashTrie.S.t ->
(CCHashTrie.S.key * 'a) CCHashTrie.sequence -> 'a CCHashTrie.S.t
val of_seq :
(CCHashTrie.S.key * 'a) CCHashTrie.sequence -> 'a CCHashTrie.S.t
val to_seq :
'a CCHashTrie.S.t -> (CCHashTrie.S.key * 'a) CCHashTrie.sequence
val add_gen :
'a CCHashTrie.S.t ->
(CCHashTrie.S.key * 'a) CCHashTrie.gen -> 'a CCHashTrie.S.t
val add_gen_mut :
id:CCHashTrie.Transient.t ->
'a CCHashTrie.S.t ->
(CCHashTrie.S.key * 'a) CCHashTrie.gen -> 'a CCHashTrie.S.t
val of_gen :
(CCHashTrie.S.key * 'a) CCHashTrie.gen -> 'a CCHashTrie.S.t
val to_gen :
'a CCHashTrie.S.t -> (CCHashTrie.S.key * 'a) CCHashTrie.gen
val print :
CCHashTrie.S.key CCHashTrie.printer ->
'a CCHashTrie.printer -> 'a CCHashTrie.S.t CCHashTrie.printer
val as_tree :
'a CCHashTrie.S.t ->
[ `L of int * (CCHashTrie.S.key * 'a) list | `N ] CCHashTrie.ktree
end
module type KEY =
sig
type t
val equal : CCHashTrie.KEY.t -> CCHashTrie.KEY.t -> bool
val hash : CCHashTrie.KEY.t -> int
end
module Make :
functor (K : KEY) ->
sig
type key = K.t
type 'a t
val empty : 'a t
val is_empty : 'a t -> bool
val singleton : key -> 'a -> 'a t
val add : key -> 'a -> 'a t -> 'a t
val mem : key -> 'a t -> bool
val get : key -> 'a t -> 'a option
val get_exn : key -> 'a t -> 'a
val remove : key -> 'a t -> 'a t
val update : key -> f:('a option -> 'a option) -> 'a t -> 'a t
val add_mut : id:Transient.t -> key -> 'a -> 'a t -> 'a t
val remove_mut : id:Transient.t -> key -> 'a t -> 'a t
val update_mut :
id:Transient.t -> key -> f:('a option -> 'a option) -> 'a t -> 'a t
val cardinal : 'a t -> int
val choose : 'a t -> (key * 'a) option
val choose_exn : 'a t -> key * 'a
val iter : f:(key -> 'a -> unit) -> 'a t -> unit
val fold : f:('b -> key -> 'a -> 'b) -> x:'b -> 'a t -> 'b
val to_list : 'a t -> (key * 'a) list
val add_list : 'a t -> (key * 'a) list -> 'a t
val add_list_mut : id:Transient.t -> 'a t -> (key * 'a) list -> 'a t
val of_list : (key * 'a) list -> 'a t
val add_seq : 'a t -> (key * 'a) sequence -> 'a t
val add_seq_mut :
id:Transient.t -> 'a t -> (key * 'a) sequence -> 'a t
val of_seq : (key * 'a) sequence -> 'a t
val to_seq : 'a t -> (key * 'a) sequence
val add_gen : 'a t -> (key * 'a) gen -> 'a t
val add_gen_mut : id:Transient.t -> 'a t -> (key * 'a) gen -> 'a t
val of_gen : (key * 'a) gen -> 'a t
val to_gen : 'a t -> (key * 'a) gen
val print : key printer -> 'a printer -> 'a t printer
val as_tree : 'a t -> [ `L of int * (key * 'a) list | `N ] ktree
end
val popcount : int -> int
end