sig
module List :
sig
type 'a t = 'a list
type 'a binable = 'a t
val bin_size_t : ('a, 'a binable) Bin_prot.Size.sizer1
val bin_write_t : ('a, 'a binable) Bin_prot.Map_to_safe.writer1
val bin_write_t_ : ('a, 'a binable) Bin_prot.Unsafe_write_c.writer1
val bin_read_t : ('a, 'a binable) Bin_prot.Map_to_safe.reader1
val bin_read_t_ : ('a, 'a binable) Bin_prot.Unsafe_read_c.reader1
val bin_read_t__ :
('a, int -> 'a binable) Bin_prot.Unsafe_read_c.reader1
val bin_writer_t : ('a, 'a binable) Bin_prot.Type_class.S1.writer
val bin_reader_t : ('a, 'a binable) Bin_prot.Type_class.S1.reader
val bin_t : ('a, 'a binable) Bin_prot.Type_class.S1.t
type 'a container = 'a t
val length : 'a container -> int
val is_empty : 'a container -> bool
val iter : 'a container -> f:('a -> unit) -> unit
val fold : 'a container -> init:'b -> f:('b -> 'a -> 'b) -> 'b
val exists : 'a container -> f:('a -> bool) -> bool
val for_all : 'a container -> f:('a -> bool) -> bool
val find : 'a container -> f:('a -> bool) -> 'a option
val to_list : 'a container -> 'a list
val to_array : 'a container -> 'a array
val container : ('a, 'a container) Container.type_class
type 'a sexpable = 'a t
val sexp_of_t : ('a -> Sexplib.Sexp.t) -> 'a sexpable -> Sexplib.Sexp.t
val t_of_sexp : (Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a sexpable
type 'a monad = 'a t
val ( >>= ) : 'a monad -> ('a -> 'b monad) -> 'b monad
val ( >>| ) : 'a monad -> ('a -> 'b) -> 'b monad
module Monad_infix :
sig
type 'a monad = 'a monad
val ( >>= ) : 'a monad -> ('a -> 'b monad) -> 'b monad
val ( >>| ) : 'a monad -> ('a -> 'b) -> 'b monad
end
val bind : 'a monad -> ('a -> 'b monad) -> 'b monad
val return : 'a -> 'a monad
val join : 'a monad monad -> 'a monad
val ignore : 'a monad -> unit monad
val nth : 'a t -> int -> 'a option
val nth_exn : 'a t -> int -> 'a
val rev : 'a t -> 'a t
val rev_append : 'a t -> 'a t -> 'a t
val unordered_append : 'a t -> 'a t -> 'a t
val rev_map : f:('a -> 'b) -> 'a t -> 'b t
val fold_left : 'a t -> init:'b -> f:('b -> 'a -> 'b) -> 'b
val iter2_exn : 'a t -> 'b t -> f:('a -> 'b -> unit) -> unit
val rev_map2_exn : 'a t -> 'b t -> f:('a -> 'b -> 'c) -> 'c t
val fold2_exn :
'a t -> 'b t -> init:'c -> f:('c -> 'a -> 'b -> 'c) -> 'c
val for_all2_exn : 'a t -> 'b t -> f:('a -> 'b -> bool) -> bool
val exists2_exn : 'a t -> 'b t -> f:('a -> 'b -> bool) -> bool
val mem : 'a -> set:'a t -> bool
val memq : 'a -> set:'a t -> bool
val filter : f:('a -> bool) -> 'a t -> 'a t
val rev_filter : f:('a -> bool) -> 'a t -> 'a t
val filteri : 'a t -> f:(int -> 'a -> bool) -> 'a t
val find_all : f:('a -> bool) -> 'a t -> 'a t
val partition : 'a t -> f:('a -> bool) -> 'a t * 'a t
val sort : cmp:('a -> 'a -> int) -> 'a t -> 'a t
val stable_sort : cmp:('a -> 'a -> int) -> 'a t -> 'a t
val merge : 'a t -> 'a t -> cmp:('a -> 'a -> int) -> 'a t
val hd : 'a t -> 'a option
val tl : 'a t -> 'a t option
val hd_exn : 'a t -> 'a
val tl_exn : 'a t -> 'a t
val findi : 'a t -> f:(int -> 'a -> bool) -> (int * 'a) option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val find_exn : 'a t -> f:('a -> bool) -> 'a
val append : 'a t -> 'a t -> 'a t
val map : 'a t -> f:('a -> 'b) -> 'b t
val concat_map : 'a t -> f:('a -> 'b t) -> 'b t
val map2_exn : 'a t -> 'b t -> f:('a -> 'b -> 'c) -> 'c t
val rev_map3_exn :
'a t -> 'b t -> 'c t -> f:('a -> 'b -> 'c -> 'd) -> 'd t
val map3_exn : 'a t -> 'b t -> 'c t -> f:('a -> 'b -> 'c -> 'd) -> 'd t
val rev_map_append : 'a t -> 'b t -> f:('a -> 'b) -> 'b t
val fold_right : 'a t -> f:('a -> 'b -> 'b) -> init:'b -> 'b
val split : ('a * 'b) t -> 'a t * 'b t
val combine_exn : 'a t -> 'b t -> ('a * 'b) t
val mapi : 'a t -> f:(int -> 'a -> 'b) -> 'b t
val rev_mapi : 'a t -> f:(int -> 'a -> 'b) -> 'b t
val iteri : 'a t -> f:(int -> 'a -> unit) -> unit
val foldi : 'a t -> f:(int -> 'b -> 'a -> 'b) -> init:'b -> 'b
val reduce_exn : 'a t -> f:('a -> 'a -> 'a) -> 'a
val reduce : 'a t -> f:('a -> 'a -> 'a) -> 'a option
val group : 'a t -> break:('a -> 'a -> bool) -> 'a t t
val groupi : 'a t -> break:(int -> 'a -> 'a -> bool) -> 'a t t
val last : 'a t -> 'a option
val last_exn : 'a t -> 'a
val dedup : ?compare:('a -> 'a -> int) -> 'a t -> 'a t
val stable_dedup : 'a t -> 'a t
val contains_dup : ?compare:('a -> 'a -> int) -> 'a t -> bool
val find_a_dup : ?compare:('a -> 'a -> int) -> 'a t -> 'a option
exception Duplicate_found of (unit -> Sexplib.Sexp.t) * string
val exn_if_dup :
?compare:('a -> 'a -> int) ->
?context:string -> 'a t -> to_sexp:('a -> Sexplib.Sexp.t) -> unit
val count : 'a t -> f:('a -> bool) -> int
val range : ?stride:int -> int -> int -> int t
val frange : ?stride:float -> float -> float -> float t
val init : int -> f:(int -> 'a) -> 'a t
val rev_filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val rev_filter_mapi : 'a t -> f:(int -> 'a -> 'b option) -> 'b t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi : 'a t -> f:(int -> 'a -> 'b option) -> 'b t
val filter_opt : 'a option t -> 'a t
val partition_map :
'a t -> f:('a -> [ `Fst of 'b | `Snd of 'c ]) -> 'b t * 'c t
module Assoc :
sig
type ('a, 'b) t = ('a * 'b) list
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
('b -> Sexplib.Sexp.t) -> ('a, 'b) t -> Sexplib.Sexp.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> ('a, 'b) t
val add :
('a, 'b) t -> ?equal:('a -> 'a -> bool) -> 'a -> 'b -> ('a, 'b) t
val find :
('a, 'b) t -> ?equal:('a -> 'a -> bool) -> 'a -> 'b option
val find_exn : ('a, 'b) t -> ?equal:('a -> 'a -> bool) -> 'a -> 'b
val mem : ('a, 'b) t -> ?equal:('a -> 'a -> bool) -> 'a -> bool
val remove :
('a, 'b) t -> ?equal:('a -> 'a -> bool) -> 'a -> ('a, 'b) t
val map : ('a, 'b) t -> f:('b -> 'c) -> ('a, 'c) t
val inverse : ('a, 'b) t -> ('b, 'a) t
end
val split_n : 'a t -> int -> 'a t * 'a t
val sub : 'a t -> pos:int -> len:int -> 'a t
val slice : 'a t -> int -> int -> 'a t
val take : 'a t -> int -> 'a t
val drop : 'a t -> int -> 'a t
val take_while : 'a t -> f:('a -> bool) -> 'a t
val drop_while : 'a t -> f:('a -> bool) -> 'a t
val concat : 'a t t -> 'a t
val flatten : 'a t t -> 'a t
val flatten_no_order : 'a t t -> 'a t
val cons : 'a -> 'a t -> 'a t
val cartesian_product : 'a t -> 'b t -> ('a * 'b) t
val to_string : ('a -> string) -> 'a t -> string
val permute : ?random_state:Random.State.t -> 'a t -> 'a t
val is_sorted : 'a t -> compare:('a -> 'a -> int) -> bool
val compare : 'a t -> 'a t -> cmp:('a -> 'a -> int) -> int
val equal : 'a t -> 'a t -> ('a -> 'a -> bool) -> bool
module Infix : sig val ( @ ) : 'a t -> 'a t -> 'a t end
end
module Array :
sig
type 'a t = 'a array
type 'a binable = 'a t
val bin_size_t : ('a, 'a binable) Bin_prot.Size.sizer1
val bin_write_t : ('a, 'a binable) Bin_prot.Map_to_safe.writer1
val bin_write_t_ : ('a, 'a binable) Bin_prot.Unsafe_write_c.writer1
val bin_read_t : ('a, 'a binable) Bin_prot.Map_to_safe.reader1
val bin_read_t_ : ('a, 'a binable) Bin_prot.Unsafe_read_c.reader1
val bin_read_t__ :
('a, int -> 'a binable) Bin_prot.Unsafe_read_c.reader1
val bin_writer_t : ('a, 'a binable) Bin_prot.Type_class.S1.writer
val bin_reader_t : ('a, 'a binable) Bin_prot.Type_class.S1.reader
val bin_t : ('a, 'a binable) Bin_prot.Type_class.S1.t
type 'a container = 'a t
val length : 'a container -> int
val is_empty : 'a container -> bool
val iter : 'a container -> f:('a -> unit) -> unit
val fold : 'a container -> init:'b -> f:('b -> 'a -> 'b) -> 'b
val exists : 'a container -> f:('a -> bool) -> bool
val for_all : 'a container -> f:('a -> bool) -> bool
val find : 'a container -> f:('a -> bool) -> 'a option
val to_list : 'a container -> 'a list
val to_array : 'a container -> 'a array
val container : ('a, 'a container) Container.type_class
type 'a sexpable = 'a t
val sexp_of_t : ('a -> Sexplib.Sexp.t) -> 'a sexpable -> Sexplib.Sexp.t
val t_of_sexp : (Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a sexpable
external get : 'a t -> int -> 'a = "%array_safe_get"
external set : 'a t -> int -> 'a -> unit = "%array_safe_set"
external unsafe_get : 'a t -> int -> 'a = "%array_unsafe_get"
external unsafe_set : 'a t -> int -> 'a -> unit = "%array_unsafe_set"
val create : int -> 'a -> 'a t
val init : int -> f:(int -> 'a) -> 'a t
val make_matrix : dimx:int -> dimy:int -> 'a -> 'a t t
val append : 'a t -> 'a t -> 'a t
val concat : 'a t list -> 'a t
val sub : 'a t -> pos:int -> len:int -> 'a t
val copy : 'a t -> 'a t
val fill : 'a t -> pos:int -> len:int -> 'a -> unit
val blit :
src:'a t -> src_pos:int -> dst:'a t -> dst_pos:int -> len:int -> unit
val of_list : 'a list -> 'a t
val map : f:('a -> 'b) -> 'a t -> 'b t
val iteri : f:(int -> 'a -> unit) -> 'a t -> unit
val mapi : f:(int -> 'a -> 'b) -> 'a t -> 'b t
val fold_right : f:('a -> 'b -> 'b) -> 'a t -> init:'b -> 'b
val sort : cmp:('a -> 'a -> int) -> 'a t -> unit
val stable_sort : cmp:('a -> 'a -> int) -> 'a t -> unit
val concat_map : 'a t -> f:('a -> 'b array) -> 'b array
val max_length : int
val cartesian_product : 'a t -> 'b t -> ('a * 'b) t
val normalize : 'a t -> int -> int
val slice : 'a t -> int -> int -> 'a t
val nget : 'a t -> int -> 'a
val nset : 'a t -> int -> 'a -> unit
val filter_opt : 'a option t -> 'a t
val filter_map : 'a t -> f:('a -> 'b option) -> 'b t
val filter_mapi : 'a t -> f:(int -> 'a -> 'b option) -> 'b t
val iter2 : 'a t -> 'b t -> f:('a -> 'b -> unit) -> unit
val map2 : 'a t -> 'b t -> f:('a -> 'b -> 'c) -> 'c t
val for_all2 : 'a t -> 'b t -> f:('a -> 'b -> bool) -> bool
val filter : f:('a -> bool) -> 'a t -> 'a t
val filteri : f:(int -> 'a -> bool) -> 'a t -> 'a t
val swap : 'a t -> int -> int -> unit
val mem : 'a -> 'a t -> bool
val rev_inplace : 'a t -> unit
val of_list_rev : 'a list -> 'a t
val replace : 'a t -> int -> f:('a -> 'a) -> unit
val replace_all : 'a t -> f:('a -> 'a) -> unit
val find_exn : 'a t -> f:('a -> bool) -> 'a
val findi : 'a t -> f:('a -> bool) -> int option
val findi_exn : 'a t -> f:('a -> bool) -> int
val reduce : 'a t -> f:('a -> 'a -> 'a) -> 'a option
val reduce_exn : 'a t -> f:('a -> 'a -> 'a) -> 'a
val permute : ?random_state:Random.State.t -> 'a t -> unit
val combine : 'a t -> 'b t -> ('a * 'b) t
val split : ('a * 'b) t -> 'a t * 'b t
val sorted_copy : 'a t -> cmp:('a -> 'a -> int) -> 'a t
val last : 'a t -> 'a
val empty : unit -> 'a t
module Infix : sig val ( <|> ) : 'a t -> int * int -> 'a t end
end
module Hashtbl :
sig
module type Key = Core_hashtbl_intf.Key
val hash : 'a -> int
val hash_param : int -> int -> 'a -> int
module T : sig type ('a, 'b) t = ('a, 'b) Core_hashtbl.T.t end
type ('a, 'b) t = ('a, 'b) T.t
val clear : ('a, 'b) T.t -> unit
val copy : ('a, 'b) T.t -> ('a, 'b) T.t
val invariant : ('a, 'b) T.t -> unit
val fold :
('a, 'b) T.t ->
init:'c ->
f:(key:'a Core_hashtbl_intf.Key_poly.t -> data:'b -> 'c -> 'c) -> 'c
val iter :
('a, 'b) T.t ->
f:(key:'a Core_hashtbl_intf.Key_poly.t -> data:'b -> unit) -> unit
val existsi :
('a, 'b) T.t ->
f:(key:'a Core_hashtbl_intf.Key_poly.t -> data:'b -> bool) -> bool
val exists : ('a, 'b) T.t -> f:('b -> bool) -> bool
val length : ('a, 'b) T.t -> int
val is_empty : ('a, 'b) T.t -> bool
val mem : ('a, 'b) T.t -> 'a Core_hashtbl_intf.Key_poly.t -> bool
val remove : ('a, 'b) T.t -> 'a Core_hashtbl_intf.Key_poly.t -> unit
val remove_one :
('a, 'b list) T.t -> 'a Core_hashtbl_intf.Key_poly.t -> unit
val replace :
('a, 'b) T.t ->
key:'a Core_hashtbl_intf.Key_poly.t -> data:'b -> unit
val change :
('a, 'b) T.t ->
'a Core_hashtbl_intf.Key_poly.t -> ('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) T.t ->
key:'a Core_hashtbl_intf.Key_poly.t -> data:'b -> unit
val map : ('a, 'b) T.t -> f:('b -> 'c) -> ('a, 'c) T.t
val mapi :
('a, 'b) T.t ->
f:(key:'a Core_hashtbl_intf.Key_poly.t -> data:'b -> 'c) ->
('a, 'c) T.t
val filter_map : ('a, 'b) T.t -> f:('b -> 'c option) -> ('a, 'c) T.t
val filter_mapi :
('a, 'b) T.t ->
f:(key:'a Core_hashtbl_intf.Key_poly.t -> data:'b -> 'c option) ->
('a, 'c) T.t
val filter : ('a, 'b) T.t -> f:('b -> bool) -> ('a, 'b) T.t
val filteri :
('a, 'b) T.t ->
f:(key:'a Core_hashtbl_intf.Key_poly.t -> data:'b -> bool) ->
('a, 'b) T.t
val find_or_add :
('a, 'b) T.t ->
'a Core_hashtbl_intf.Key_poly.t -> default:(unit -> 'b) -> 'b
val find : ('a, 'b) T.t -> 'a Core_hashtbl_intf.Key_poly.t -> 'b option
val find_exn : ('a, 'b) T.t -> 'a Core_hashtbl_intf.Key_poly.t -> 'b
val iter_vals : ('a, 'b) T.t -> f:('b -> unit) -> unit
val merge :
f:(key:'a Core_hashtbl_intf.Key_poly.t ->
'b option -> 'c option -> 'd option) ->
('a, 'b) T.t -> ('a, 'c) T.t -> ('a, 'd) T.t
val merge_into :
f:(key:'a Core_hashtbl_intf.Key_poly.t ->
'b -> 'b option -> 'b option) ->
src:('a, 'b) T.t -> dst:('a, 'b) T.t -> unit
val keys : ('a, 'b) T.t -> 'a Core_hashtbl_intf.Key_poly.t list
val data : ('a, 'b) T.t -> 'b list
val filter_inplace : ('a, 'b) T.t -> f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) T.t ->
f:('a Core_hashtbl_intf.Key_poly.t -> 'b -> bool) -> unit
val equal : ('a, 'b) T.t -> ('a, 'b) T.t -> ('b -> 'b -> bool) -> bool
val to_alist :
('a, 'b) T.t -> ('a Core_hashtbl_intf.Key_poly.t * 'b) list
val incr :
?by:int -> ('a, int) T.t -> 'a Core_hashtbl_intf.Key_poly.t -> unit
type ('a, 'b) binable = ('a, 'b) t
val bin_size_t : ('a, 'b, ('a, 'b) binable) Bin_prot.Size.sizer2
val bin_write_t :
('a, 'b, ('a, 'b) binable) Bin_prot.Map_to_safe.writer2
val bin_write_t_ :
('a, 'b, ('a, 'b) binable) Bin_prot.Unsafe_write_c.writer2
val bin_read_t :
('a, 'b, ('a, 'b) binable) Bin_prot.Map_to_safe.reader2
val bin_read_t_ :
('a, 'b, ('a, 'b) binable) Bin_prot.Unsafe_read_c.reader2
val bin_read_t__ :
('a, 'b, int -> ('a, 'b) binable) Bin_prot.Unsafe_read_c.reader2
val bin_writer_t :
('a, 'b, ('a, 'b) binable) Bin_prot.Type_class.S2.writer
val bin_reader_t :
('a, 'b, ('a, 'b) binable) Bin_prot.Type_class.S2.reader
val bin_t : ('a, 'b, ('a, 'b) binable) Bin_prot.Type_class.S2.t
type ('a, 'b) sexpable = ('a, 'b) t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
('b -> Sexplib.Sexp.t) -> ('a, 'b) sexpable -> Sexplib.Sexp.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> ('a, 'b) sexpable
module Poly :
sig
type ('a, 'b) binable = ('a, 'b) t
val bin_size_t : ('a, 'b, ('a, 'b) binable) Bin_prot.Size.sizer2
val bin_write_t :
('a, 'b, ('a, 'b) binable) Bin_prot.Map_to_safe.writer2
val bin_write_t_ :
('a, 'b, ('a, 'b) binable) Bin_prot.Unsafe_write_c.writer2
val bin_read_t :
('a, 'b, ('a, 'b) binable) Bin_prot.Map_to_safe.reader2
val bin_read_t_ :
('a, 'b, ('a, 'b) binable) Bin_prot.Unsafe_read_c.reader2
val bin_read_t__ :
('a, 'b, int -> ('a, 'b) binable) Bin_prot.Unsafe_read_c.reader2
val bin_writer_t :
('a, 'b, ('a, 'b) binable) Bin_prot.Type_class.S2.writer
val bin_reader_t :
('a, 'b, ('a, 'b) binable) Bin_prot.Type_class.S2.reader
val bin_t : ('a, 'b, ('a, 'b) binable) Bin_prot.Type_class.S2.t
type ('a, 'b) sexpable = ('a, 'b) t
val sexp_of_t :
('a -> Sexplib.Sexp.t) ->
('b -> Sexplib.Sexp.t) -> ('a, 'b) sexpable -> Sexplib.Sexp.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) ->
(Sexplib.Sexp.t -> 'b) -> Sexplib.Sexp.t -> ('a, 'b) sexpable
val create : (unit -> ('a, 'b) T.t) Core_hashtbl_intf.with_options
val of_alist :
(('a Core_hashtbl_intf.Key_poly.t * 'b) list ->
[ `Duplicate_key of 'a Core_hashtbl_intf.Key_poly.t
| `Ok of ('a, 'b) T.t ])
Core_hashtbl_intf.with_options
val of_alist_exn :
(('a Core_hashtbl_intf.Key_poly.t * 'b) list -> ('a, 'b) T.t)
Core_hashtbl_intf.with_options
val of_alist_multi :
(('a Core_hashtbl_intf.Key_poly.t * 'b) list -> ('a, 'b list) T.t)
Core_hashtbl_intf.with_options
val create_mapped :
(get_key:('a -> 'b Core_hashtbl_intf.Key_poly.t) ->
get_data:('a -> 'c) -> 'a list -> ('b, 'c) T.t)
Core_hashtbl_intf.with_options
val create_with_key :
(get_key:('a -> 'b Core_hashtbl_intf.Key_poly.t) ->
'a list -> ('b, 'a) T.t)
Core_hashtbl_intf.with_options
val group :
(get_key:('a -> 'b Core_hashtbl_intf.Key_poly.t) ->
get_data:('a -> 'c) ->
combine:('c -> 'c -> 'c) -> 'a list -> ('b, 'c) T.t)
Core_hashtbl_intf.with_options
end
module Make :
functor (Key : Key) ->
sig
module Key : sig type t = Key.t end
val hashable : Key.t Core_hashtbl_intf.hashable
type 'a t = (Key.t, 'a) Core_hashtbl_intf.Monomorphic(T)(Key).T.t
val clear :
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t -> unit
val copy :
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ->
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t
val invariant :
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t -> unit
val fold :
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ->
init:'c ->
f:(key:'a Core_hashtbl_intf.Monomorphic(T)(Key).Key1.t ->
data:'b -> 'c -> 'c) ->
'c
val iter :
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ->
f:(key:'a Core_hashtbl_intf.Monomorphic(T)(Key).Key1.t ->
data:'b -> unit) ->
unit
val existsi :
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ->
f:(key:'a Core_hashtbl_intf.Monomorphic(T)(Key).Key1.t ->
data:'b -> bool) ->
bool
val exists :
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ->
f:('b -> bool) -> bool
val length :
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t -> int
val is_empty :
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t -> bool
val mem :
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ->
'a Core_hashtbl_intf.Monomorphic(T)(Key).Key1.t -> bool
val remove :
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ->
'a Core_hashtbl_intf.Monomorphic(T)(Key).Key1.t -> unit
val remove_one :
('a, 'b list) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ->
'a Core_hashtbl_intf.Monomorphic(T)(Key).Key1.t -> unit
val replace :
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ->
key:'a Core_hashtbl_intf.Monomorphic(T)(Key).Key1.t ->
data:'b -> unit
val change :
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ->
'a Core_hashtbl_intf.Monomorphic(T)(Key).Key1.t ->
('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ->
key:'a Core_hashtbl_intf.Monomorphic(T)(Key).Key1.t ->
data:'b -> unit
val map :
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ->
f:('b -> 'c) ->
('a, 'c) Core_hashtbl_intf.Monomorphic(T)(Key).T.t
val mapi :
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ->
f:(key:'a Core_hashtbl_intf.Monomorphic(T)(Key).Key1.t ->
data:'b -> 'c) ->
('a, 'c) Core_hashtbl_intf.Monomorphic(T)(Key).T.t
val filter_map :
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ->
f:('b -> 'c option) ->
('a, 'c) Core_hashtbl_intf.Monomorphic(T)(Key).T.t
val filter_mapi :
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ->
f:(key:'a Core_hashtbl_intf.Monomorphic(T)(Key).Key1.t ->
data:'b -> 'c option) ->
('a, 'c) Core_hashtbl_intf.Monomorphic(T)(Key).T.t
val filter :
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ->
f:('b -> bool) ->
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t
val filteri :
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ->
f:(key:'a Core_hashtbl_intf.Monomorphic(T)(Key).Key1.t ->
data:'b -> bool) ->
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t
val find_or_add :
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ->
'a Core_hashtbl_intf.Monomorphic(T)(Key).Key1.t ->
default:(unit -> 'b) -> 'b
val find :
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ->
'a Core_hashtbl_intf.Monomorphic(T)(Key).Key1.t -> 'b option
val find_exn :
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ->
'a Core_hashtbl_intf.Monomorphic(T)(Key).Key1.t -> 'b
val iter_vals :
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ->
f:('b -> unit) -> unit
val merge :
f:(key:'a Core_hashtbl_intf.Monomorphic(T)(Key).Key1.t ->
'b option -> 'c option -> 'd option) ->
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ->
('a, 'c) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ->
('a, 'd) Core_hashtbl_intf.Monomorphic(T)(Key).T.t
val merge_into :
f:(key:'a Core_hashtbl_intf.Monomorphic(T)(Key).Key1.t ->
'b -> 'b option -> 'b option) ->
src:('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ->
dst:('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t -> unit
val keys :
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ->
'a Core_hashtbl_intf.Monomorphic(T)(Key).Key1.t list
val data :
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t -> 'b list
val filter_inplace :
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ->
f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ->
f:('a Core_hashtbl_intf.Monomorphic(T)(Key).Key1.t ->
'b -> bool) ->
unit
val equal :
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ->
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ->
('b -> 'b -> bool) -> bool
val to_alist :
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ->
('a Core_hashtbl_intf.Monomorphic(T)(Key).Key1.t * 'b) list
val incr :
?by:int ->
('a, int) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ->
'a Core_hashtbl_intf.Monomorphic(T)(Key).Key1.t -> unit
val create :
(unit -> ('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t)
Core_hashtbl_intf.with_options
val of_alist :
(('a Core_hashtbl_intf.Monomorphic(T)(Key).Key1.t * 'b) list ->
[ `Duplicate_key of
'a Core_hashtbl_intf.Monomorphic(T)(Key).Key1.t
| `Ok of ('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ])
Core_hashtbl_intf.with_options
val of_alist_exn :
(('a Core_hashtbl_intf.Monomorphic(T)(Key).Key1.t * 'b) list ->
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t)
Core_hashtbl_intf.with_options
val of_alist_multi :
(('a Core_hashtbl_intf.Monomorphic(T)(Key).Key1.t * 'b) list ->
('a, 'b list) Core_hashtbl_intf.Monomorphic(T)(Key).T.t)
Core_hashtbl_intf.with_options
val create_mapped :
(get_key:('a -> 'b Core_hashtbl_intf.Monomorphic(T)(Key).Key1.t) ->
get_data:('a -> 'c) ->
'a list -> ('b, 'c) Core_hashtbl_intf.Monomorphic(T)(Key).T.t)
Core_hashtbl_intf.with_options
val create_with_key :
(get_key:('a -> 'b Core_hashtbl_intf.Monomorphic(T)(Key).Key1.t) ->
'a list -> ('b, 'a) Core_hashtbl_intf.Monomorphic(T)(Key).T.t)
Core_hashtbl_intf.with_options
val group :
(get_key:('a -> 'b Core_hashtbl_intf.Monomorphic(T)(Key).Key1.t) ->
get_data:('a -> 'c) ->
combine:('c -> 'c -> 'c) ->
'a list -> ('b, 'c) Core_hashtbl_intf.Monomorphic(T)(Key).T.t)
Core_hashtbl_intf.with_options
type 'a sexpable = 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a sexpable -> Sexplib.Sexp.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a sexpable
end
module Make_binable :
functor
(Key : sig
type t
val compare : t -> t -> int
val hash : t -> int
type sexpable = t
val sexp_of_t : sexpable -> Sexplib.Sexp.t
val t_of_sexp : Sexplib.Sexp.t -> sexpable
type binable = t
val bin_size_t : binable Bin_prot.Size.sizer
val bin_write_t : binable Bin_prot.Map_to_safe.writer
val bin_write_t_ : binable Bin_prot.Unsafe_write_c.writer
val bin_read_t : binable Bin_prot.Read_ml.reader
val bin_read_t_ : binable Bin_prot.Unsafe_read_c.reader
val bin_read_t__ :
(int -> binable) Bin_prot.Unsafe_read_c.reader
val bin_writer_t : binable Bin_prot.Type_class.writer
val bin_reader_t : binable Bin_prot.Type_class.reader
val bin_t : binable Bin_prot.Type_class.t
end) ->
sig
module Key : sig type t = Key.t end
val hashable : Key.t Core_hashtbl_intf.hashable
type 'a t = (Key.t, 'a) Core_hashtbl_intf.Monomorphic(T)(Key).T.t
val clear :
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t -> unit
val copy :
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ->
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t
val invariant :
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t -> unit
val fold :
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ->
init:'c ->
f:(key:'a Core_hashtbl_intf.Monomorphic(T)(Key).Key1.t ->
data:'b -> 'c -> 'c) ->
'c
val iter :
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ->
f:(key:'a Core_hashtbl_intf.Monomorphic(T)(Key).Key1.t ->
data:'b -> unit) ->
unit
val existsi :
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ->
f:(key:'a Core_hashtbl_intf.Monomorphic(T)(Key).Key1.t ->
data:'b -> bool) ->
bool
val exists :
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ->
f:('b -> bool) -> bool
val length :
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t -> int
val is_empty :
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t -> bool
val mem :
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ->
'a Core_hashtbl_intf.Monomorphic(T)(Key).Key1.t -> bool
val remove :
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ->
'a Core_hashtbl_intf.Monomorphic(T)(Key).Key1.t -> unit
val remove_one :
('a, 'b list) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ->
'a Core_hashtbl_intf.Monomorphic(T)(Key).Key1.t -> unit
val replace :
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ->
key:'a Core_hashtbl_intf.Monomorphic(T)(Key).Key1.t ->
data:'b -> unit
val change :
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ->
'a Core_hashtbl_intf.Monomorphic(T)(Key).Key1.t ->
('b option -> 'b option) -> unit
val add_multi :
('a, 'b list) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ->
key:'a Core_hashtbl_intf.Monomorphic(T)(Key).Key1.t ->
data:'b -> unit
val map :
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ->
f:('b -> 'c) ->
('a, 'c) Core_hashtbl_intf.Monomorphic(T)(Key).T.t
val mapi :
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ->
f:(key:'a Core_hashtbl_intf.Monomorphic(T)(Key).Key1.t ->
data:'b -> 'c) ->
('a, 'c) Core_hashtbl_intf.Monomorphic(T)(Key).T.t
val filter_map :
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ->
f:('b -> 'c option) ->
('a, 'c) Core_hashtbl_intf.Monomorphic(T)(Key).T.t
val filter_mapi :
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ->
f:(key:'a Core_hashtbl_intf.Monomorphic(T)(Key).Key1.t ->
data:'b -> 'c option) ->
('a, 'c) Core_hashtbl_intf.Monomorphic(T)(Key).T.t
val filter :
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ->
f:('b -> bool) ->
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t
val filteri :
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ->
f:(key:'a Core_hashtbl_intf.Monomorphic(T)(Key).Key1.t ->
data:'b -> bool) ->
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t
val find_or_add :
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ->
'a Core_hashtbl_intf.Monomorphic(T)(Key).Key1.t ->
default:(unit -> 'b) -> 'b
val find :
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ->
'a Core_hashtbl_intf.Monomorphic(T)(Key).Key1.t -> 'b option
val find_exn :
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ->
'a Core_hashtbl_intf.Monomorphic(T)(Key).Key1.t -> 'b
val iter_vals :
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ->
f:('b -> unit) -> unit
val merge :
f:(key:'a Core_hashtbl_intf.Monomorphic(T)(Key).Key1.t ->
'b option -> 'c option -> 'd option) ->
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ->
('a, 'c) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ->
('a, 'd) Core_hashtbl_intf.Monomorphic(T)(Key).T.t
val merge_into :
f:(key:'a Core_hashtbl_intf.Monomorphic(T)(Key).Key1.t ->
'b -> 'b option -> 'b option) ->
src:('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ->
dst:('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t -> unit
val keys :
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ->
'a Core_hashtbl_intf.Monomorphic(T)(Key).Key1.t list
val data :
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t -> 'b list
val filter_inplace :
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ->
f:('b -> bool) -> unit
val filteri_inplace :
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ->
f:('a Core_hashtbl_intf.Monomorphic(T)(Key).Key1.t ->
'b -> bool) ->
unit
val equal :
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ->
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ->
('b -> 'b -> bool) -> bool
val to_alist :
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ->
('a Core_hashtbl_intf.Monomorphic(T)(Key).Key1.t * 'b) list
val incr :
?by:int ->
('a, int) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ->
'a Core_hashtbl_intf.Monomorphic(T)(Key).Key1.t -> unit
val create :
(unit -> ('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t)
Core_hashtbl_intf.with_options
val of_alist :
(('a Core_hashtbl_intf.Monomorphic(T)(Key).Key1.t * 'b) list ->
[ `Duplicate_key of
'a Core_hashtbl_intf.Monomorphic(T)(Key).Key1.t
| `Ok of ('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t ])
Core_hashtbl_intf.with_options
val of_alist_exn :
(('a Core_hashtbl_intf.Monomorphic(T)(Key).Key1.t * 'b) list ->
('a, 'b) Core_hashtbl_intf.Monomorphic(T)(Key).T.t)
Core_hashtbl_intf.with_options
val of_alist_multi :
(('a Core_hashtbl_intf.Monomorphic(T)(Key).Key1.t * 'b) list ->
('a, 'b list) Core_hashtbl_intf.Monomorphic(T)(Key).T.t)
Core_hashtbl_intf.with_options
val create_mapped :
(get_key:('a -> 'b Core_hashtbl_intf.Monomorphic(T)(Key).Key1.t) ->
get_data:('a -> 'c) ->
'a list -> ('b, 'c) Core_hashtbl_intf.Monomorphic(T)(Key).T.t)
Core_hashtbl_intf.with_options
val create_with_key :
(get_key:('a -> 'b Core_hashtbl_intf.Monomorphic(T)(Key).Key1.t) ->
'a list -> ('b, 'a) Core_hashtbl_intf.Monomorphic(T)(Key).T.t)
Core_hashtbl_intf.with_options
val group :
(get_key:('a -> 'b Core_hashtbl_intf.Monomorphic(T)(Key).Key1.t) ->
get_data:('a -> 'c) ->
combine:('c -> 'c -> 'c) ->
'a list -> ('b, 'c) Core_hashtbl_intf.Monomorphic(T)(Key).T.t)
Core_hashtbl_intf.with_options
type 'a sexpable = 'a t
val sexp_of_t :
('a -> Sexplib.Sexp.t) -> 'a sexpable -> Sexplib.Sexp.t
val t_of_sexp :
(Sexplib.Sexp.t -> 'a) -> Sexplib.Sexp.t -> 'a sexpable
type 'a binable = 'a t
val bin_size_t : ('a, 'a binable) Bin_prot.Size.sizer1
val bin_write_t : ('a, 'a binable) Bin_prot.Map_to_safe.writer1
val bin_write_t_ :
('a, 'a binable) Bin_prot.Unsafe_write_c.writer1
val bin_read_t : ('a, 'a binable) Bin_prot.Map_to_safe.reader1
val bin_read_t_ : ('a, 'a binable) Bin_prot.Unsafe_read_c.reader1
val bin_read_t__ :
('a, int -> 'a binable) Bin_prot.Unsafe_read_c.reader1
val bin_writer_t : ('a, 'a binable) Bin_prot.Type_class.S1.writer
val bin_reader_t : ('a, 'a binable) Bin_prot.Type_class.S1.reader
val bin_t : ('a, 'a binable) Bin_prot.Type_class.S1.t
end
end
module type Key = Hashtbl.Key
module type S =
sig
module Key : Key
type 'a t
type 'a container = 'a t
val length : 'a container -> int
val is_empty : 'a container -> bool
val iter : 'a container -> f:('a -> unit) -> unit
val fold : 'a container -> init:'b -> f:('b -> 'a -> 'b) -> 'b
val exists : 'a container -> f:('a -> bool) -> bool
val for_all : 'a container -> f:('a -> bool) -> bool
val find : 'a container -> f:('a -> bool) -> 'a option
val to_list : 'a container -> 'a list
val to_array : 'a container -> 'a array
val container : ('a, 'a container) Container.type_class
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue : 'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace : 'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t -> init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
module Make :
functor (Key : Key) ->
sig
module Key :
sig
type t = Key.t
val compare : t -> t -> int
val hash : t -> int
type sexpable = t
val sexp_of_t : sexpable -> Sexplib.Sexp.t
val t_of_sexp : Sexplib.Sexp.t -> sexpable
end
type 'a t = 'a Hash_queue.Make(Key).t
type 'a container = 'a t
val length : 'a container -> int
val is_empty : 'a container -> bool
val iter : 'a container -> f:('a -> unit) -> unit
val fold : 'a container -> init:'b -> f:('b -> 'a -> 'b) -> 'b
val exists : 'a container -> f:('a -> bool) -> bool
val for_all : 'a container -> f:('a -> bool) -> bool
val find : 'a container -> f:('a -> bool) -> 'a option
val to_list : 'a container -> 'a list
val to_array : 'a container -> 'a array
val container : ('a, 'a container) Container.type_class
val invariant : 'a t -> unit
val create : unit -> 'a t
val clear : 'a t -> unit
val mem : 'a t -> Key.t -> bool
val lookup : 'a t -> Key.t -> 'a option
val lookup_exn : 'a t -> Key.t -> 'a
val enqueue : 'a t -> Key.t -> 'a -> [ `Key_already_present | `Ok ]
val enqueue_exn : 'a t -> Key.t -> 'a -> unit
val keys : 'a t -> Key.t list
val dequeue : 'a t -> 'a option
val dequeue_exn : 'a t -> 'a
val dequeue_with_key : 'a t -> (Key.t * 'a) option
val dequeue_with_key_exn : 'a t -> Key.t * 'a
val dequeue_all : 'a t -> f:('a -> unit) -> unit
val remove : 'a t -> Key.t -> [ `No_such_key | `Ok ]
val remove_exn : 'a t -> Key.t -> unit
val replace : 'a t -> Key.t -> 'a -> [ `No_such_key | `Ok ]
val replace_exn : 'a t -> Key.t -> 'a -> unit
val iteri : 'a t -> f:(key:Key.t -> data:'a -> unit) -> unit
val foldi :
'a t -> init:'b -> f:('b -> key:Key.t -> data:'a -> 'b) -> 'b
end
end