···11-From: Mehdi Dogguy <mehdi@debian.org>
22-Date: Wed, 16 May 2012 14:48:40 +0200
33-Subject: Port to OCamlgraph 1.8.2
44-55- o Graph.Topological: as of OCamlgraph 1.8.2, the input graph must
66- implement Sig.COMPARABLE instead of Sig.HASHABLE
77----
88- src/misc/service_graph.ml | 2 +-
99- src/misc/service_graph.mli | 2 +-
1010- src/semantic_callgraph/register.ml | 1 +
1111- src/syntactic_callgraph/register.ml | 1 +
1212- 4 files changed, 4 insertions(+), 2 deletions(-)
1313-1414-diff --git a/src/misc/service_graph.ml b/src/misc/service_graph.ml
1515-index f30a1be..567698f 100644
1616---- a/src/misc/service_graph.ml
1717-+++ b/src/misc/service_graph.ml
1818-@@ -24,7 +24,7 @@ module Make
1919- (G: sig
2020- type t
2121- module V: sig
2222-- include Graph.Sig.HASHABLE
2323-+ include Graph.Sig.COMPARABLE
2424- val id: t -> int
2525- val name: t -> string
2626- val attributes: t -> Graph.Graphviz.DotAttributes.vertex list
2727-diff --git a/src/misc/service_graph.mli b/src/misc/service_graph.mli
2828-index 5ebb570..8006977 100644
2929---- a/src/misc/service_graph.mli
3030-+++ b/src/misc/service_graph.mli
3131-@@ -28,7 +28,7 @@ module Make
3232- (G: sig
3333- type t
3434- module V: sig
3535-- include Graph.Sig.HASHABLE
3636-+ include Graph.Sig.COMPARABLE
3737- val id: t -> int
3838- (** assume is >= 0 and unique for each vertices of the graph *)
3939- val name: t -> string
4040-diff --git a/src/semantic_callgraph/register.ml b/src/semantic_callgraph/register.ml
4141-index 0b3b4df..064dca8 100644
4242---- a/src/semantic_callgraph/register.ml
4343-+++ b/src/semantic_callgraph/register.ml
4444-@@ -107,6 +107,7 @@ module Service =
4545- (if Kernel_function.is_definition v then `Bold
4646- else `Dotted) ]
4747- let equal = Kernel_function.equal
4848-+ let compare v1 v2 = Datatype.Int.compare (id v1) (id v2)
4949- let hash = Kernel_function.hash
5050- let entry_point () =
5151- try Some (fst (Globals.entry_point ()))
5252-diff --git a/src/syntactic_callgraph/register.ml b/src/syntactic_callgraph/register.ml
5353-index 4efb594..d9d78b9 100644
5454---- a/src/syntactic_callgraph/register.ml
5555-+++ b/src/syntactic_callgraph/register.ml
5656-@@ -41,6 +41,7 @@ module Service =
5757- | NIVar (_,b) when not !b -> `Style `Dotted
5858- | _ -> `Style `Bold ]
5959- let equal v1 v2 = id v1 = id v2
6060-+ let compare v1 v2 = Datatype.Int.compare (id v1) (id v2)
6161- let hash = id
6262- let entry_point () = !entry_point_ref
6363- end
6464---