From 3b005bfdb2d595f5b8e094f940ae26f072780faf Mon Sep 17 00:00:00 2001 From: ppedrot Date: Thu, 9 May 2013 21:53:44 +0000 Subject: Documenting the Tries module, uniformizing the names according to Map/Set style and renaming the file accordingly as Trie. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16504 85f007b7-540e-0410-9357-904b9bb8a0f7 --- lib/trie.mli | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 lib/trie.mli (limited to 'lib/trie.mli') diff --git a/lib/trie.mli b/lib/trie.mli new file mode 100644 index 0000000000..6d14cf9cbf --- /dev/null +++ b/lib/trie.mli @@ -0,0 +1,52 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* data list + (** Get the data at the current node. *) + + val next : t -> label -> t + (** [next t lbl] returns the subtrie of [t] pointed by [lbl]. + @raise Not_found if there is none. *) + + val labels : t -> label list + (** Get the list of defined labels at the current node. *) + + val add : label list -> data -> t -> t + (** [add t path v] adds [v] at path [path] in [t]. *) + + val remove : label list -> data -> t -> t + (** [remove t path v] removes [v] from path [path] in [t]. *) + + val iter : (label list -> data -> unit) -> t -> unit + (** Apply a function to all contents. *) + +end + +module Make (Label : Set.OrderedType) (Data : Set.OrderedType) : S + with type label = Label.t and type data = Data.t +(** Generating functor, for a given type of labels and data. *) -- cgit v1.2.3