From ffdde781b762873f465d8bb93c2ba70decffb0c5 Mon Sep 17 00:00:00 2001 From: herbelin Date: Wed, 24 Jul 2002 16:23:44 +0000 Subject: Ajout d'un point d'entree pour exporter les arbres de preuves en XML git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@2917 85f007b7-540e-0410-9357-904b9bb8a0f7 --- proofs/pfedit.ml | 4 ++++ proofs/pfedit.mli | 3 +++ 2 files changed, 7 insertions(+) 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"] *) -- cgit v1.2.3