src/Pure/Isar/isar_cmd.ML
changeset 59210 8658b4290aed
parent 59208 2486d625878b
child 59917 9830c944670f
equal deleted inserted replaced
59209:8521841f277b 59210:8658b4290aed
   272 
   272 
   273 val thy_deps = Toplevel.unknown_theory o Toplevel.keep (fn state =>
   273 val thy_deps = Toplevel.unknown_theory o Toplevel.keep (fn state =>
   274   let
   274   let
   275     val thy = Toplevel.theory_of state;
   275     val thy = Toplevel.theory_of state;
   276     val thy_session = Present.session_name thy;
   276     val thy_session = Present.session_name thy;
   277 
   277   in
   278     val gr_nodes = rev (Theory.nodes_of thy) |> map (fn node =>
   278     Theory.nodes_of thy
   279       let
   279     |> map (fn thy_node =>
   280         val name = Context.theory_name node;
   280         let
   281         val parents = map Context.theory_name (Theory.parents_of node);
   281           val name = Context.theory_name thy_node;
   282         val session = Present.session_name node;
   282           val parents = map Context.theory_name (Theory.parents_of thy_node);
   283         val unfold = (session = thy_session);
   283           val session = Present.session_name thy_node;
   284       in
   284           val node =
   285        ((name, Graph_Display.session_node
   285             Graph_Display.session_node
   286          {name = name, directory = session, unfold = unfold, path = ""}), parents)
   286               {name = name, directory = session, unfold = session = thy_session, path = ""};
   287       end);
   287         in ((name, node), parents) end)
   288   in Graph_Display.display_graph (map (fst o fst) gr_nodes, Graph.make gr_nodes) end);
   288     |> Graph_Display.display_graph
       
   289   end);
   289 
   290 
   290 val locale_deps = Toplevel.unknown_theory o Toplevel.keep (fn state =>
   291 val locale_deps = Toplevel.unknown_theory o Toplevel.keep (fn state =>
   291   let
   292   let
   292     val thy = Toplevel.theory_of state;
   293     val thy = Toplevel.theory_of state;
   293     val gr = Locale.pretty_locale_deps thy
   294   in
   294       |> map (fn {name, parents, body} => ((name,
   295     Locale.pretty_locale_deps thy
   295           Graph_Display.content_node (Locale.extern thy name) [body]), parents))
   296     |> map (fn {name, parents, body} =>
   296       |> Graph.make;
   297       ((name, Graph_Display.content_node (Locale.extern thy name) [body]), parents))
   297   in Graph_Display.display_graph ([], gr) end);
   298     |> Graph_Display.display_graph
       
   299   end);
   298 
   300 
   299 
   301 
   300 (* print theorems, terms, types etc. *)
   302 (* print theorems, terms, types etc. *)
   301 
   303 
   302 local
   304 local