397 in {name = name, ID = name, parents = parents, dir = session, unfold = unfold, path = ""} end); |
397 in {name = name, ID = name, parents = parents, dir = session, unfold = unfold, path = ""} end); |
398 in Present.display_graph gr end); |
398 in Present.display_graph gr end); |
399 |
399 |
400 val class_deps = Toplevel.unknown_theory o Toplevel.keep (fn state => |
400 val class_deps = Toplevel.unknown_theory o Toplevel.keep (fn state => |
401 let |
401 let |
402 val thy = Toplevel.theory_of state; |
402 val ctxt = Toplevel.context_of state; |
403 val {classes = (space, algebra), ...} = Type.rep_tsig (Sign.tsig_of thy); |
403 val {classes = (space, algebra), ...} = Type.rep_tsig (ProofContext.tsig_of ctxt); |
404 val classes = Sorts.classes_of algebra; |
404 val classes = Sorts.classes_of algebra; |
405 fun entry (c, (i, (_, cs))) = |
405 fun entry (c, (i, (_, cs))) = |
406 (i, {name = Name_Space.extern space c, ID = c, parents = cs, |
406 (i, {name = Name_Space.extern ctxt space c, ID = c, parents = cs, |
407 dir = "", unfold = true, path = ""}); |
407 dir = "", unfold = true, path = ""}); |
408 val gr = |
408 val gr = |
409 Graph.fold (cons o entry) classes [] |
409 Graph.fold (cons o entry) classes [] |
410 |> sort (int_ord o pairself #1) |> map #2; |
410 |> sort (int_ord o pairself #1) |> map #2; |
411 in Present.display_graph gr end); |
411 in Present.display_graph gr end); |