summaryrefslogtreecommitdiff
path: root/lib/configuration/graph_tree.ml
diff options
context:
space:
mode:
Diffstat (limited to 'lib/configuration/graph_tree.ml')
-rw-r--r--lib/configuration/graph_tree.ml14
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/configuration/graph_tree.ml b/lib/configuration/graph_tree.ml
index 25c9366..240c1c9 100644
--- a/lib/configuration/graph_tree.ml
+++ b/lib/configuration/graph_tree.ml
@@ -9,9 +9,13 @@
module Vertex = struct
type t = Model.Reference.t Model.Content.t
- let compare t1 t2 = String.compare (Model.Content.id t1) (Model.Content.id t2)
- let equal t1 t2 = String.equal (Model.Content.id t1) (Model.Content.id t2)
- let hash t = Hashtbl.hash (Model.Content.id t)
+ let compare t1 t2 =
+ Model.Identifier.compare (Model.Content.id t1) (Model.Content.id t2)
+
+ let equal t1 t2 =
+ Model.Identifier.equal (Model.Content.id t1) (Model.Content.id t2)
+
+ let hash t = Model.Identifier.hash (Model.Content.id t)
end
module Edge = struct
@@ -20,7 +24,7 @@ module Edge = struct
let compare e1 e2 =
match (e1, e2) with
| Field f1, Field f2 ->
- String.compare (Model.Field.name f1) (Model.Field.name f2)
+ Model.Identifier.compare (Model.Field.name f1) (Model.Field.name f2)
| Default, Default -> 0
| _, _ -> Stdlib.compare e1 e2
@@ -33,7 +37,7 @@ module GV_Printer = Graph.Graphviz.Dot (struct
include G
let graph_attributes _ = []
- let vertex_name v = Model.Content.id v
+ let vertex_name v = Model.Identifier.to_string (Model.Content.id v)
let vertex_attributes _ = []
let default_vertex_attributes _ = []
let edge_attributes _ = []