···1-From: Mehdi Dogguy <mehdi@debian.org>
2-Date: Wed, 16 May 2012 14:48:40 +0200
3-Subject: Port to OCamlgraph 1.8.2
4-5- o Graph.Topological: as of OCamlgraph 1.8.2, the input graph must
6- implement Sig.COMPARABLE instead of Sig.HASHABLE
7----
8- src/misc/service_graph.ml | 2 +-
9- src/misc/service_graph.mli | 2 +-
10- src/semantic_callgraph/register.ml | 1 +
11- src/syntactic_callgraph/register.ml | 1 +
12- 4 files changed, 4 insertions(+), 2 deletions(-)
13-14-diff --git a/src/misc/service_graph.ml b/src/misc/service_graph.ml
15-index f30a1be..567698f 100644
16---- a/src/misc/service_graph.ml
17-+++ b/src/misc/service_graph.ml
18-@@ -24,7 +24,7 @@ module Make
19- (G: sig
20- type t
21- module V: sig
22-- include Graph.Sig.HASHABLE
23-+ include Graph.Sig.COMPARABLE
24- val id: t -> int
25- val name: t -> string
26- val attributes: t -> Graph.Graphviz.DotAttributes.vertex list
27-diff --git a/src/misc/service_graph.mli b/src/misc/service_graph.mli
28-index 5ebb570..8006977 100644
29---- a/src/misc/service_graph.mli
30-+++ b/src/misc/service_graph.mli
31-@@ -28,7 +28,7 @@ module Make
32- (G: sig
33- type t
34- module V: sig
35-- include Graph.Sig.HASHABLE
36-+ include Graph.Sig.COMPARABLE
37- val id: t -> int
38- (** assume is >= 0 and unique for each vertices of the graph *)
39- val name: t -> string
40-diff --git a/src/semantic_callgraph/register.ml b/src/semantic_callgraph/register.ml
41-index 0b3b4df..064dca8 100644
42---- a/src/semantic_callgraph/register.ml
43-+++ b/src/semantic_callgraph/register.ml
44-@@ -107,6 +107,7 @@ module Service =
45- (if Kernel_function.is_definition v then `Bold
46- else `Dotted) ]
47- let equal = Kernel_function.equal
48-+ let compare v1 v2 = Datatype.Int.compare (id v1) (id v2)
49- let hash = Kernel_function.hash
50- let entry_point () =
51- try Some (fst (Globals.entry_point ()))
52-diff --git a/src/syntactic_callgraph/register.ml b/src/syntactic_callgraph/register.ml
53-index 4efb594..d9d78b9 100644
54---- a/src/syntactic_callgraph/register.ml
55-+++ b/src/syntactic_callgraph/register.ml
56-@@ -41,6 +41,7 @@ module Service =
57- | NIVar (_,b) when not !b -> `Style `Dotted
58- | _ -> `Style `Bold ]
59- let equal v1 v2 = id v1 = id v2
60-+ let compare v1 v2 = Datatype.Int.compare (id v1) (id v2)
61- let hash = id
62- let entry_point () = !entry_point_ref
63- end
64---