package tezos-protocol-compiler

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
include Map.S with type key = t
type key = t
type !+'a t
val empty : 'a t
val is_empty : 'a t -> bool
val mem : key -> 'a t -> bool
val add : key -> 'a -> 'a t -> 'a t
val update : key -> ('a option -> 'a option) -> 'a t -> 'a t
val singleton : key -> 'a -> 'a t
val remove : key -> 'a t -> 'a t
val merge : (key -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> 'c t
val union : (key -> 'a -> 'a -> 'a option) -> 'a t -> 'a t -> 'a t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val iter_e : (key -> 'a -> (unit, 'trace) Pervasives.result) -> 'a t -> (unit, 'trace) Pervasives.result

iter_e f m applies f to the bindings of m one by one in an unspecified order. If all the applications result in Ok (), then the result of the iteration is Ok (). If any of the applications results in Error e then the iteration stops and the result of the iteration is Error e.

val iter_s : (key -> 'a -> unit Lwt.t) -> 'a t -> unit Lwt.t
val iter_p : (key -> 'a -> unit Lwt.t) -> 'a t -> unit Lwt.t
val iter_es : (key -> 'a -> (unit, 'trace) Pervasives.result Lwt.t) -> 'a t -> (unit, 'trace) Pervasives.result Lwt.t

iter_es f m applies f to the bindings of m in an unspecified order, one after the other as the promises resolve. If all the applications result in Ok (), then the result of the iteration is Ok (). If any of the applications results in Error e then the iteration stops and the result of the iteration is Error e.

val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val fold_e : (key -> 'a -> 'b -> ('b, 'trace) Pervasives.result) -> 'a t -> 'b -> ('b, 'trace) Pervasives.result

fold_e f m init is f k1 d1 init >>? fun acc -> f k2 d2 acc >>? fun acc -> … where kN is the key bound to dN in m.

val fold_s : (key -> 'a -> 'b -> 'b Lwt.t) -> 'a t -> 'b -> 'b Lwt.t
val fold_es : (key -> 'a -> 'b -> ('b, 'trace) Pervasives.result Lwt.t) -> 'a t -> 'b -> ('b, 'trace) Pervasives.result Lwt.t

fold_es f m init is f k1 d1 init >>=? fun acc -> f k2 d2 acc >>=? fun acc -> … where kN is the key bound to dN in m.

val for_all : (key -> 'a -> bool) -> 'a t -> bool
val exists : (key -> 'a -> bool) -> 'a t -> bool
val filter : (key -> 'a -> bool) -> 'a t -> 'a t
val partition : (key -> 'a -> bool) -> 'a t -> 'a t * 'a t
val cardinal : 'a t -> int
val bindings : 'a t -> (key * 'a) list
val min_binding : 'a t -> (key * 'a) option
val max_binding : 'a t -> (key * 'a) option
val choose : 'a t -> (key * 'a) option
val split : key -> 'a t -> 'a t * 'a option * 'a t
val find : key -> 'a t -> 'a option
val find_first : (key -> bool) -> 'a t -> (key * 'a) option
val find_last : (key -> bool) -> 'a t -> (key * 'a) option
val map : ('a -> 'b) -> 'a t -> 'b t
val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t
val to_seq : 'a t -> (key * 'a) Seq.t
val to_seq_from : key -> 'a t -> (key * 'a) Seq.t
val add_seq : (key * 'a) Seq.t -> 'a t -> 'a t
val of_seq : (key * 'a) Seq.t -> 'a t
val iter_ep : (key -> 'a -> (unit, 'error Error_monad.trace) Pervasives.result Lwt.t) -> 'a t -> (unit, 'error Error_monad.trace) Pervasives.result Lwt.t
val encoding : 'a Data_encoding.t -> 'a t Data_encoding.t