equal
deleted
inserted
replaced
20 val generic_theory_of: state -> generic_theory |
20 val generic_theory_of: state -> generic_theory |
21 val theory_of: state -> theory |
21 val theory_of: state -> theory |
22 val proof_of: state -> Proof.state |
22 val proof_of: state -> Proof.state |
23 val proof_position_of: state -> int |
23 val proof_position_of: state -> int |
24 val end_theory: Position.T -> state -> theory |
24 val end_theory: Position.T -> state -> theory |
25 val pretty_state_context: state -> Pretty.T list |
25 val pretty_context: state -> Pretty.T list |
26 val pretty_state: state -> Pretty.T list |
26 val pretty_state: state -> Pretty.T list |
27 val print_state: state -> unit |
27 val print_state: state -> unit |
28 val pretty_abstract: state -> Pretty.T |
28 val pretty_abstract: state -> Pretty.T |
29 val quiet: bool Unsynchronized.ref |
29 val quiet: bool Unsynchronized.ref |
30 val interact: bool Unsynchronized.ref |
30 val interact: bool Unsynchronized.ref |
196 | end_theory pos (State (SOME _, _)) = error ("Unfinished theory" ^ Position.here pos); |
196 | end_theory pos (State (SOME _, _)) = error ("Unfinished theory" ^ Position.here pos); |
197 |
197 |
198 |
198 |
199 (* print state *) |
199 (* print state *) |
200 |
200 |
201 val pretty_context = Local_Theory.pretty o Context.cases (Named_Target.theory_init) I; |
201 fun pretty_context state = |
202 |
|
203 fun pretty_state_context state = |
|
204 (case try node_of state of |
202 (case try node_of state of |
205 NONE => [] |
203 NONE => [] |
206 | SOME (Theory (gthy, _)) => pretty_context gthy |
204 | SOME node => |
207 | SOME (Proof (_, (_, gthy))) => pretty_context gthy |
205 let |
208 | SOME (Skipped_Proof (_, (gthy, _))) => pretty_context gthy); |
206 val gthy = |
|
207 (case node of |
|
208 Theory (gthy, _) => gthy |
|
209 | Proof (_, (_, gthy)) => gthy |
|
210 | Skipped_Proof (_, (gthy, _)) => gthy); |
|
211 val lthy = Context.cases (Named_Target.theory_init) I gthy; |
|
212 in Local_Theory.pretty lthy end); |
209 |
213 |
210 fun pretty_state state = |
214 fun pretty_state state = |
211 (case try node_of state of |
215 (case try node_of state of |
212 NONE => [] |
216 NONE => [] |
213 | SOME (Theory _) => [] |
217 | SOME (Theory _) => [] |