diff options
-rw-r--r-- | lib/cMap.ml | 2 | ||||
-rw-r--r-- | lib/cMap.mli | 2 | ||||
-rw-r--r-- | lib/cSig.mli | 32 |
3 files changed, 34 insertions, 2 deletions
diff --git a/lib/cMap.ml b/lib/cMap.ml index 42a4111b1..2d95681f8 100644 --- a/lib/cMap.ml +++ b/lib/cMap.ml @@ -17,7 +17,7 @@ module type S = Map.S module type ExtS = sig include Map.S - module Set : Set.S with type elt = key + module Set : CSig.SetS with type elt = key val update : key -> 'a -> 'a t -> 'a t val modify : key -> (key -> 'a -> 'a) -> 'a t -> 'a t val domain : 'a t -> Set.t diff --git a/lib/cMap.mli b/lib/cMap.mli index 9fe335551..4009ec99e 100644 --- a/lib/cMap.mli +++ b/lib/cMap.mli @@ -21,7 +21,7 @@ sig include Map.S (** The underlying Map library *) - module Set : Set.S with type elt = key + module Set : CSig.SetS with type elt = key (** Sets used by the domain function *) val update : key -> 'a -> 'a t -> 'a t diff --git a/lib/cSig.mli b/lib/cSig.mli index dbc36b14f..2a8bda293 100644 --- a/lib/cSig.mli +++ b/lib/cSig.mli @@ -13,3 +13,35 @@ type ('a, 'b) union = Inl of 'a | Inr of 'b type 'a until = Stop of 'a | Cont of 'a (** Used for browsable-until structures. *) + +module type SetS = +sig + type elt + type t + val empty: t + val is_empty: t -> bool + val mem: elt -> t -> bool + val add: elt -> t -> t + val singleton: elt -> t + val remove: elt -> t -> t + val union: t -> t -> t + val inter: t -> t -> t + val diff: t -> t -> t + val compare: t -> t -> int + val equal: t -> t -> bool + val subset: t -> t -> bool + val iter: (elt -> unit) -> t -> unit + val fold: (elt -> 'a -> 'a) -> t -> 'a -> 'a + val for_all: (elt -> bool) -> t -> bool + val exists: (elt -> bool) -> t -> bool + val filter: (elt -> bool) -> t -> t + val partition: (elt -> bool) -> t -> t * t + val cardinal: t -> int + val elements: t -> elt list + val min_elt: t -> elt + val max_elt: t -> elt + val choose: t -> elt + val split: elt -> t -> t * bool * t +end +(** Redeclaration of OCaml set signature, to preserve compatibility. See OCaml + documentation for more information. *) |