Up

module Ir_misc

: sig

Misc functions and signatures.

#
module OP : sig
#
val force : Pervasives.out_channel -> string Lazy.t -> unit
#
val (!!) : Pervasives.out_channel -> string Lazy.t -> unit
#
val show : 'a Tc.t -> 'a -> string Lazy.t
#
val shows : 'a Tc.t -> 'a list -> string Lazy.t
end
#
module type MAP = sig

Persistent Maps.

include Map.S
include Tc.S1 with type 'a t := 'a t
#
val to_alist : 'a t -> (key * 'a) list
#
val of_alist : (key * 'a) list -> 'a t
#
val keys : 'a t -> key list
#
val add_multi : key -> 'a -> 'a list t -> 'a list t
#
val iter2 : (key -> [
| `Both of 'a * 'b
| `Left of 'a
| `Right of 'b
] -> unit) -> 'a t -> 'b t -> unit
#
module Lwt : sig
#
val merge : (key -> [
| `Both of 'a * 'b
| `Left of 'a
| `Right of 'b
] -> 'c option Lwt.t) -> 'a t -> 'b t -> 'c t Lwt.t
#
val iter2 : (key -> [
| `Both of 'a * 'b
| `Left of 'a
| `Right of 'b
] -> unit Lwt.t) -> 'a t -> 'b t -> unit Lwt.t
end
end
#
module Map_ext : functor (M : Map.S) -> functor (S : Tc.S0 with type t = M.key) -> MAP with type key = S.t and type 'a t = 'a M.t
#
module Map : functor (S : Tc.S0) -> MAP with type key = S.t and type 'a t = 'a Map.Make(S).t
#
module type SET = sig

Persistent Sets.

include Set.S
include Tc.S0 with type t := t
#
val of_list : elt list -> t
#
val to_list : t -> elt list
end
#
module Set : functor (K : Tc.S0) -> SET with type elt = K.t and type t = Set.Make(K).t
#
val list_partition_map : ('a -> [
| `Fst of 'b
| `Snd of 'c
]) -> 'a list -> 'b list * 'c list
#
val list_pretty : ('a -> string) -> 'a list -> string
#
val list_filter_map : ('a -> 'b option) -> 'a list -> 'b list
#
val list_dedup : ?compare:'a Tc.compare -> 'a list -> 'a list
#
val list_end : 'a list -> 'a list * 'a
#
val alist_merge_lwt : ('key -> 'key -> int) -> ('key -> [
| `Both of 'a * 'b
| `Left of 'a
| `Right of 'b
] -> 'c option Lwt.t) -> ('key * 'a) list -> ('key * 'b) list -> ('key * 'c) list Lwt.t
#
val hashtbl_add_multi : ('a, 'b list) Hashtbl.t -> 'a -> 'b -> unit
#
val is_valid_utf8 : string -> bool
#
val tag : Cstruct.t -> int -> Cstruct.t
#
val untag : Mstruct.t -> int
end