]> matita.cs.unibo.it Git - helm.git/blobdiff - components/extlib/graphvizPp.ml
BIG FAT COMMIT REGARDING COERCIONS:
[helm.git] / components / extlib / graphvizPp.ml
index 4804699e0a7ef048dae9851641411e7e768be6e5..82fa9807de15a786b8bd7e338ca82af3348976e5 100644 (file)
@@ -30,6 +30,7 @@ type attribute = string * string  (* <key, value> pair *)
 module type GraphvizFormatter =
   sig
     val header:
+      ?graph_type:string -> 
       ?name:string -> ?graph_attrs:(attribute list) ->
       ?node_attrs:(attribute list) -> ?edge_attrs:(attribute list) ->
       Format.formatter ->
@@ -55,8 +56,8 @@ module Dot =
       attributes attrs fmt;
       fprintf fmt "];@]@,"
 
-    let header ?(name = "g") ?(graph_attrs = []) ?node_attrs ?edge_attrs fmt =
-      fprintf fmt "@[<hv2>strict digraph %s {@," name;
+    let header ?(graph_type = "digraph") ?(name = "g") ?(graph_attrs = []) ?node_attrs ?edge_attrs fmt =
+      fprintf fmt "@[<hv2>%s %s {@," graph_type name;
       List.iter (fun (k, v) -> fprintf fmt "@[<hv2>%s=@,%s;@]@," k v)
         graph_attrs;
       (match node_attrs with