X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fmatita%2FmatitaProof.ml;h=17b44ffd3ee600ca79af6e2d7d123c2fd01ef7b6;hb=06c2b37f3d7d4e14cabeef3b18211e5d12b9b4eb;hp=98b9cf02c85178f85c71e528759b891075caa07e;hpb=015263908d9142798bcbddbe4c4d13f71e08c5c3;p=helm.git diff --git a/helm/matita/matitaProof.ml b/helm/matita/matitaProof.ml index 98b9cf02c..17b44ffd3 100644 --- a/helm/matita/matitaProof.ml +++ b/helm/matita/matitaProof.ml @@ -23,26 +23,25 @@ * http://helm.cs.unibo.it/ *) + (** create a Cic.CurrentProof from a given proof *) +let currentProof (uri, metasenv, bo, ty) = + let uri = MatitaTypes.unopt_uri uri in + (* TODO CSC: Wrong: [] is just plainly wrong *) + Cic.CurrentProof (UriManager.name_of_uri uri, metasenv, bo, ty, []) + class proof ?uri ~typ ~metasenv ~body () = object (self) - inherit [unit] StatefulProofEngine.status ?uri ~typ ~body ~metasenv - (fun _ -> ()) - (fun _ _ -> ()) - () - - method private currentProof = - let (uri, metasenv, bo, ty) = self#proof in - let uri = - match uri with - | Some uri -> uri - | None -> MatitaTypes.untitled_con_uri - in - (* TODO CSC: Wrong: [] is just plainly wrong *) - Cic.CurrentProof (UriManager.name_of_uri uri, metasenv, bo, ty, []) + inherit [MatitaTypes.hist_metadata] + StatefulProofEngine.status ?uri ~typ ~body ~metasenv + (fun proof -> + Cic2acic.acic_object_of_cic_object (currentProof (fst proof))) + (fun (old_proof, old_metadata) new_proof -> + Cic2acic.acic_object_of_cic_object (currentProof (fst new_proof))) + () method toXml = - let currentproof = self#currentProof in + let currentproof = currentProof self#proof in let (acurrentproof,_,_,ids_to_inner_sorts,_,_,_) = Cic2acic.acic_object_of_cic_object ~eta_fix:false currentproof in