module type KEY = sig type 'a t val comp: 'a t -> 'b t -> ('a, 'b) Tools.cmp val repr: Format.formatter -> 'a t -> unit end module Make (El : KEY) : sig type t (** Create an empty tree *) val empty: t (** Return the element in the tree with the given key *) val find: 'a El.t -> t -> 'a (** Add one element in the tree, if the element is already present, it is replaced. *) val add: 'a El.t -> 'a -> t -> t (** Check if the key exists *) val member: 'a El.t -> t -> bool val remove: 'a El.t -> t -> t (** This type is used in the fold function as existencial type *) type container = C : ('a El.t * 'a) -> container [@@unboxed] val fold: ('a -> container -> 'a) -> 'a -> t -> 'a (** Represent the content in dot syntax *) val repr: Format.formatter -> t -> unit end