equal
deleted
inserted
replaced
20 val node_of: state -> node |
20 val node_of: state -> node |
21 val node_case: (theory -> 'a) -> (Proof.state -> 'a) -> state -> 'a |
21 val node_case: (theory -> 'a) -> (Proof.state -> 'a) -> state -> 'a |
22 val theory_of: state -> theory |
22 val theory_of: state -> theory |
23 val sign_of: state -> theory (*obsolete*) |
23 val sign_of: state -> theory (*obsolete*) |
24 val body_context_of: state -> Proof.context |
24 val body_context_of: state -> Proof.context |
|
25 val no_body_context: state -> state |
25 val proof_of: state -> Proof.state |
26 val proof_of: state -> Proof.state |
26 val is_proof: state -> bool |
27 val is_proof: state -> bool |
27 val enter_forward_proof: state -> Proof.state |
28 val enter_forward_proof: state -> Proof.state |
28 val prompt_state_default: state -> string |
29 val prompt_state_default: state -> string |
29 val prompt_state_fn: (state -> string) ref |
30 val prompt_state_fn: (state -> string) ref |
147 fun body_context_of state = |
148 fun body_context_of state = |
148 (case node_of state of |
149 (case node_of state of |
149 Theory (_, SOME ctxt) => ctxt |
150 Theory (_, SOME ctxt) => ctxt |
150 | _ => node_case ProofContext.init Proof.context_of state); |
151 | _ => node_case ProofContext.init Proof.context_of state); |
151 |
152 |
|
153 fun no_body_context (State NONE) = State NONE |
|
154 | no_body_context (State (SOME (node, x))) = |
|
155 State (SOME (History.apply (fn Theory (thy, _) => Theory (thy, NONE) | nd => nd) node, x)); |
|
156 |
152 val proof_of = node_case (fn _ => raise UNDEF) I; |
157 val proof_of = node_case (fn _ => raise UNDEF) I; |
153 val is_proof = can proof_of; |
158 val is_proof = can proof_of; |
154 |
159 |
155 val enter_forward_proof = node_case Proof.init Proof.enter_forward; |
160 val enter_forward_proof = node_case Proof.init Proof.enter_forward; |
156 |
161 |