X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=sigs.mli;fp=sigs.mli;h=aa670ceb46723c95608fa235e242075d570443e4;hb=d04661689691b4587cfc45a35e98604fcdc2b878;hp=0000000000000000000000000000000000000000;hpb=f84dd2f6de7d5da16da729dc2e91cbdeb3585d75;p=SXSI%2Fxpathcomp.git diff --git a/sigs.mli b/sigs.mli new file mode 100644 index 0000000..aa670ce --- /dev/null +++ b/sigs.mli @@ -0,0 +1,79 @@ +(* Quite useful, taken from CDuce, cduce/misc/custom.ml *) +module type Set = sig + include Set.S + val hash : t -> int + val equal : t -> t -> bool +end + +module type T = sig + type t + (* Debugging *) + val dump : Format.formatter -> t -> unit + val check : t -> unit (* Check internal invariants *) + + (* Data structures *) + val equal : t -> t -> bool + val hash : t -> int + val compare :t -> t -> int + val print : Format.formatter -> t -> unit +end + +module type TAG = +sig + include T + val attribute : t + val pcdata : t + val to_string : t -> string + val tag : string -> t +end + +module type BINARY_TREE = + functor (Tag:TAG) -> +sig + include T + module Tag : TAG with type t = Tag.t + val parse_xml_uri : string -> t + val parse_xml_string : string -> t + + val root : t -> t + + val is_string : t -> bool + val is_node : t -> bool + val is_nil : t -> bool + + val string : t -> string + val first_child : t -> t + val next_sibling : t -> t + val parent : t -> t + + val id : t -> int + val tag : t -> Tag.t + + val print_xml : out_channel -> t -> unit + val size : t -> int*int*int*int +end +module type BINARY_TREE_S = +sig + include T + module Tag : TAG + val parse_xml_uri : string -> t + val parse_xml_string : string -> t + + val root : t -> t + + val is_string : t -> bool + val is_node : t -> bool + val is_nil : t -> bool + + val string : t -> string + val first_child : t -> t + val next_sibling : t -> t + val parent : t -> t + + val id : t -> int + val tag : t -> Tag.t + + val print_xml : out_channel -> t -> unit + val dump : Format.formatter -> t -> unit + val size : t -> int*int*int*int +end