summaryrefslogtreecommitdiff
path: root/src/finite_map.ml
diff options
context:
space:
mode:
authorKathy Gray2014-01-30 18:16:58 +0000
committerKathy Gray2014-01-30 18:16:58 +0000
commit54f7ded021bbf6753fc4f85abfd3e70eea07b0c5 (patch)
treef0792a0abb669f9e60347e075b1f31eb00f789aa /src/finite_map.ml
parentfbab4d994f6a7c868975d2972e4f60b390daa649 (diff)
Expression type checking, not complete
Diffstat (limited to 'src/finite_map.ml')
-rw-r--r--src/finite_map.ml2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/finite_map.ml b/src/finite_map.ml
index 72fb15ac..3058e0c9 100644
--- a/src/finite_map.ml
+++ b/src/finite_map.ml
@@ -57,6 +57,7 @@ module type Fmap = sig
val insert : 'a t -> (k * 'a) -> 'a t
(* Keys from the right argument replace those from the left *)
val union : 'a t -> 'a t -> 'a t
+ val intersect : 'a t -> 'a t -> 'a t
val big_union : 'a t list -> 'a t
val merge : (k -> 'a option -> 'b option -> 'c option) -> 'a t -> 'b t -> 'c t
val apply : 'a t -> k -> 'a option
@@ -92,6 +93,7 @@ module Fmap_map(Key : Set.OrderedType) : Fmap
let insert m (k,v) = M.add k v m
let union m1 m2 =
M.merge (fun k v1 v2 -> match v2 with | None -> v1 | Some _ -> v2) m1 m2
+ let intersect m1 m2 = m2 (*WRITE ME TODO*)
let merge f m1 m2 = M.merge f m1 m2
let apply m k =
try