33 val done_proof: Toplevel.transition -> Toplevel.transition |
33 val done_proof: Toplevel.transition -> Toplevel.transition |
34 val skip_proof: Toplevel.transition -> Toplevel.transition |
34 val skip_proof: Toplevel.transition -> Toplevel.transition |
35 val ml_diag: bool -> Symbol_Pos.source -> Toplevel.transition -> Toplevel.transition |
35 val ml_diag: bool -> Symbol_Pos.source -> Toplevel.transition -> Toplevel.transition |
36 val diag_state: Proof.context -> Toplevel.state |
36 val diag_state: Proof.context -> Toplevel.state |
37 val diag_goal: Proof.context -> {context: Proof.context, facts: thm list, goal: thm} |
37 val diag_goal: Proof.context -> {context: Proof.context, facts: thm list, goal: thm} |
38 val print_theorems: bool -> Toplevel.transition -> Toplevel.transition |
38 val pretty_theorems: bool -> Toplevel.state -> Pretty.T |
39 val thy_deps: Toplevel.transition -> Toplevel.transition |
39 val thy_deps: Toplevel.transition -> Toplevel.transition |
40 val locale_deps: Toplevel.transition -> Toplevel.transition |
40 val locale_deps: Toplevel.transition -> Toplevel.transition |
41 val class_deps: Toplevel.transition -> Toplevel.transition |
41 val class_deps: Toplevel.transition -> Toplevel.transition |
42 val thm_deps: (Facts.ref * Attrib.src list) list -> Toplevel.transition -> Toplevel.transition |
42 val thm_deps: (Facts.ref * Attrib.src list) list -> Toplevel.transition -> Toplevel.transition |
43 val unused_thms: (string list * string list option) option -> |
43 val unused_thms: (string list * string list option) option -> |
256 (Scan.succeed "Isar_Cmd.diag_state ML_context") #> |
256 (Scan.succeed "Isar_Cmd.diag_state ML_context") #> |
257 ML_Antiquotation.value (Binding.qualify true "Isar" @{binding goal}) |
257 ML_Antiquotation.value (Binding.qualify true "Isar" @{binding goal}) |
258 (Scan.succeed "Isar_Cmd.diag_goal ML_context")); |
258 (Scan.succeed "Isar_Cmd.diag_goal ML_context")); |
259 |
259 |
260 |
260 |
261 (* print theorems *) |
261 (* theorems of theory or proof context *) |
262 |
262 |
263 fun print_theorems_proof verbose = |
263 fun pretty_theorems verbose st = |
264 Toplevel.keep (fn st => |
264 if Toplevel.is_proof st then |
265 Proof_Context.print_local_facts (Proof.context_of (Toplevel.proof_of st)) verbose); |
265 Pretty.chunks (Proof_Context.pretty_local_facts (Toplevel.context_of st) verbose) |
266 |
266 else |
267 fun print_theorems_theory verbose = Toplevel.keep (fn state => |
267 let |
268 Toplevel.theory_of state |> |
268 val thy = Toplevel.theory_of st; |
269 (case Toplevel.previous_context_of state of |
269 val prev_thys = |
270 SOME prev => Proof_Display.print_theorems_diff verbose (Proof_Context.theory_of prev) |
270 (case Toplevel.previous_context_of st of |
271 | NONE => Proof_Display.print_theorems verbose)); |
271 SOME prev => [Proof_Context.theory_of prev] |
272 |
272 | NONE => Theory.parents_of thy); |
273 fun print_theorems verbose = |
273 in Proof_Display.pretty_theorems_diff verbose prev_thys thy end; |
274 Toplevel.unknown_context o print_theorems_theory verbose o print_theorems_proof verbose; |
|
275 |
274 |
276 |
275 |
277 (* display dependencies *) |
276 (* display dependencies *) |
278 |
277 |
279 val thy_deps = Toplevel.unknown_theory o Toplevel.keep (fn state => |
278 val thy_deps = Toplevel.unknown_theory o Toplevel.keep (fn state => |