src/Tools/Code/code_thingol.ML
changeset 59210 8658b4290aed
parent 59208 2486d625878b
child 59541 f5de6e207d1d
--- a/src/Tools/Code/code_thingol.ML	Wed Dec 31 14:28:04 2014 +0100
+++ b/src/Tools/Code/code_thingol.ML	Wed Dec 31 20:42:45 2014 +0100
@@ -927,12 +927,14 @@
   let
     val thy = Proof_Context.theory_of ctxt;
     val namify = commas o map (Code.string_of_const thy);
-    val gr =
-      code_depgr ctxt consts
-      |> Graph.map (fn c => fn _ => c)
-      |> join_strong_conn 
-      |> Graph.map (fn _ => fn cs => Graph_Display.content_node (namify cs) [])
-  in Graph_Display.display_graph ([], gr) end;
+  in
+    code_depgr ctxt consts
+    |> Graph.map (fn c => fn _ => c)
+    |> join_strong_conn
+    |> Graph.dest
+    |> map (fn ((c, cs), ds) => ((c, Graph_Display.content_node (namify cs) []), ds))
+    |> Graph_Display.display_graph
+  end;
 
 local
 
@@ -953,7 +955,7 @@
     "visualize dependencies of code equations for code"
     (Scan.repeat1 Parse.term >> (fn cs =>
       Toplevel.unknown_context o
-      Toplevel.keep (fn state => code_deps_cmd (Toplevel.context_of state) cs)));
+      Toplevel.keep (fn st => code_deps_cmd (Toplevel.context_of st) cs)));
 
 end;