X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=hlist.mli;h=72102506dc87b50052d35e676371d3a25a1afaa3;hb=cad5e2e2831477cba1f6211c57b9a4cc5b58bd55;hp=15bafe550f96a1e73a937f14c598d49669423882;hpb=479afaf5e67e28ef73c0126e95ca8badec3392aa;p=SXSI%2Fxpathcomp.git diff --git a/hlist.mli b/hlist.mli index 15bafe5..7210250 100644 --- a/hlist.mli +++ b/hlist.mli @@ -1,9 +1,19 @@ module type S = sig type elt type 'a node = Nil | Cons of elt * 'a - type t + + module rec Node : + sig + include Hcons.S with type data = Data.t + end + and Data : sig + include Hashtbl.HashedType with type t = Node.t node + end + type data = Data.t + type t = Node.t val hash : t -> int val uid : t -> int + val make : data -> t val equal : t -> t -> bool val nil : t val node : t -> t node @@ -15,6 +25,7 @@ module type S = sig val iter : (elt -> 'a) -> t -> unit val rev : t -> t val rev_map : (elt -> elt) -> t -> t + val length : t -> int end -module Make (H : Hcons.S) : S with type elt = H.t +module Make (H : Hcons.SA) : S with type elt = H.t