diff options
| -rw-r--r-- | proofs/pfedit.ml | 4 | ||||
| -rw-r--r-- | proofs/pfedit.mli | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/proofs/pfedit.ml b/proofs/pfedit.ml index 410e800935..e2932a904b 100644 --- a/proofs/pfedit.ml +++ b/proofs/pfedit.ml @@ -175,12 +175,16 @@ let undo n = (* Proof cooking *) (*********************************************************************) +let xml_cook_proof = ref (fun _ -> ()) +let set_xml_cook_proof f = xml_cook_proof := f + let cook_proof () = let (pfs,ts) = get_state() and ident = get_current_proof_name () in let {evar_concl=concl} = ts.top_goal and strength = ts.top_strength in let pfterm = extract_pftreestate pfs in + !xml_cook_proof pfs; (ident, ({ const_entry_body = pfterm; const_entry_type = Some concl; diff --git a/proofs/pfedit.mli b/proofs/pfedit.mli index bb66cb6891..78314eacbc 100644 --- a/proofs/pfedit.mli +++ b/proofs/pfedit.mli @@ -98,6 +98,9 @@ val cook_proof : unit -> identifier * (Safe_typing.constant_entry * (bool * strength) * declaration_hook) +(* To export completed proofs to xml *) +val set_xml_cook_proof : (pftreestate -> unit) -> unit + (*s [get_pftreestate ()] returns the current focused pending proof or raises [UserError "no focused proof"] *) |
