module type KEY = sig type t val compare : t -> t -> int val pp : Format.formatter -> t -> unit end module Make (El : KEY) : sig type 'a t val empty : unit -> 'a t (** Create an empty tree *) val isEmpty : 'a t -> bool val find : El.t -> 'a t -> 'a option (** Return the element in the tree with the given key *) val add : El.t -> 'a -> 'a t -> 'a t (** Add one element in the tree, if the key is already present, the associated element is replaced. *) val member : El.t -> 'a t -> bool (** Check if the key exists *) val remove : El.t -> 'a t -> 'a t val fold : ('a -> El.t * 'b -> 'a) -> 'a -> 'b t -> 'a val choose : 'a t -> (El.t * 'a) option (** Return one element of the given tree, or raise Not_found if the tree is empty. Which element is chosen is unspecified, but equal elements will be chosen for equal trees. *) val pp : Format.formatter -> 'a t -> unit (** Represent the content in dot syntax *) end