projects
/
tatoo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rewrite the AST to conform to the W3C grammar
[tatoo.git]
/
src
/
finiteCofinite.ml
diff --git
a/src/finiteCofinite.ml
b/src/finiteCofinite.ml
index
1c8e6ef
..
d3d0f13
100644
(file)
--- a/
src/finiteCofinite.ml
+++ b/
src/finiteCofinite.ml
@@
-14,14
+14,10
@@
(***********************************************************************)
INCLUDE "utils.ml"
(***********************************************************************)
INCLUDE "utils.ml"
-module type S =
- sig
- include Sigs.FiniteCofiniteSet
- include Hcons.S with type t := t
- end
+include Sigs.FINITECOFINITE
module type HConsBuilder =
module type HConsBuilder =
- functor (H : Sigs.HashedType) -> Hcons.S with type data = H.t
+ functor (H : Sigs.
AUX.
HashedType) -> Hcons.S with type data = H.t
module Builder (HCB : HConsBuilder) (E : Ptset.S) :
S with type elt = E.elt and type set = E.t =
module Builder (HCB : HConsBuilder) (E : Ptset.S) :
S with type elt = E.elt and type set = E.t =
@@
-137,44
+133,46
@@
struct
in
first_cofinite E.empty l
in
first_cofinite E.empty l
+ let exn = Sigs.FINITECOFINITE.InfiniteSet
+
let fold f t a = match t.node with
| Finite s -> E.fold f s a
let fold f t a = match t.node with
| Finite s -> E.fold f s a
- | CoFinite _ -> raise
Sigs.InfiniteSet
+ | CoFinite _ -> raise
exn
let iter f t = match t.node with
| Finite t -> E.iter f t
let iter f t = match t.node with
| Finite t -> E.iter f t
- | CoFinite _ -> raise
Sigs.InfiniteSet
+ | CoFinite _ -> raise
exn
let for_all f t = match t.node with
| Finite s -> E.for_all f s
let for_all f t = match t.node with
| Finite s -> E.for_all f s
- | CoFinite _ -> raise
Sigs.InfiniteSet
+ | CoFinite _ -> raise
exn
let exists f t = match t.node with
| Finite s -> E.exists f s
let exists f t = match t.node with
| Finite s -> E.exists f s
- | CoFinite _ -> raise
Sigs.InfiniteSet
+ | CoFinite _ -> raise
exn
let filter f t = match t.node with
| Finite s -> finite (E.filter f s)
let filter f t = match t.node with
| Finite s -> finite (E.filter f s)
- | CoFinite _ -> raise
Sigs.InfiniteSet
+ | CoFinite _ -> raise
exn
let partition f t = match t.node with
| Finite s -> let a,b = E.partition f s in finite a,finite b
let partition f t = match t.node with
| Finite s -> let a,b = E.partition f s in finite a,finite b
- | CoFinite _ -> raise
Sigs.InfiniteSet
+ | CoFinite _ -> raise
exn
let cardinal t = match t.node with
| Finite s -> E.cardinal s
let cardinal t = match t.node with
| Finite s -> E.cardinal s
- | CoFinite _ -> raise
Sigs.InfiniteSet
+ | CoFinite _ -> raise
exn
let elements t = match t.node with
| Finite s -> E.elements s
let elements t = match t.node with
| Finite s -> E.elements s
- | CoFinite _ -> raise
Sigs.InfiniteSet
+ | CoFinite _ -> raise
exn
let from_list l =
finite (List.fold_left (fun x a -> E.add a x ) E.empty l)
let choose t = match t.node with
Finite s -> E.choose s
let from_list l =
finite (List.fold_left (fun x a -> E.add a x ) E.empty l)
let choose t = match t.node with
Finite s -> E.choose s
- | _ -> raise
Sigs.InfiniteSet
+ | _ -> raise
exn
let is_singleton t = match t.node with
| Finite s -> E.is_singleton s
let is_singleton t = match t.node with
| Finite s -> E.is_singleton s
@@
-191,15
+189,15
@@
struct
let s1, b, s2 = E.split x s in
finite s1, b, finite s2
let s1, b, s2 = E.split x s in
finite s1, b, finite s2
- | _ -> raise
Sigs.InfiniteSet
+ | _ -> raise
exn
let min_elt s = match s.node with
| Finite s -> E.min_elt s
let min_elt s = match s.node with
| Finite s -> E.min_elt s
- | _ -> raise
Sigs.InfiniteSet
+ | _ -> raise
exn
let max_elt s = match s.node with
| Finite s -> E.min_elt s
let max_elt s = match s.node with
| Finite s -> E.min_elt s
- | _ -> raise
Sigs.InfiniteSet
+ | _ -> raise
exn
let positive t =
match t.node with
let positive t =
match t.node with