Commit 5a95c695 authored by bguillaum's avatar bguillaum

libgrem 0.9.10 / grewui 0.9.13 -> compatibility with ocaml<3.12

git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/semagramme/libcaml-grew/trunk@6878 7838e531-6607-4d57-9587-6c381814729c
parent b844a987
......@@ -28,7 +28,7 @@ INFO = @INFO@
OCAMLFIND_DIR=`ocamlfind printconf destdir`
VERSION = 0.9.9
VERSION = 0.9.10
cleanup:
rm -rf *.cmo *.cmx *.cmi *.annot *.o *.*~
......
......@@ -273,13 +273,23 @@ module Rule = struct
check = pattern.constraints;
}
(* Ocaml < 3.12 doesn't have exists function for maps! *)
exception True
let gid_map_exists fct map =
try
Gid_map.iter (fun k v -> if fct k v then raise True) map;
false
with True -> true
(* Ocaml < 3.12 doesn't have exists function for maps! *)
let fullfill graph matching = function
| No_out (pid,edge) ->
let gid = Pid_map.find pid matching.n_match in
G_graph.edge_out graph gid edge
| No_in (pid,edge) ->
let gid = Pid_map.find pid matching.n_match in
Gid_map.exists
gid_map_exists (* should be Gid_map.exists with ocaml 3.12 *)
(fun _ node ->
List.exists (fun e -> P_edge.compatible edge e) (Massoc.assoc gid (G_node.get_next node))
) graph.G_graph.map
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment