]> matita.cs.unibo.it Git - helm.git/commitdiff
ProofEngine.goal := ==> set_proof_engine_goal
authorClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Tue, 23 Sep 2003 17:39:01 +0000 (17:39 +0000)
committerClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Tue, 23 Sep 2003 17:39:01 +0000 (17:39 +0000)
helm/gTopLevel/gTopLevel.ml

index 7fe26ff59c896b6abad5cd87bdf85c937b3ff94f..103a894ee79724bff7d7e839b8ec3dc591de3ea6 100644 (file)
@@ -593,6 +593,10 @@ let refresh_proof (output : TermViewer.proof_viewer) =
 prerr_endline ("Offending proof: " ^ CicPp.ppobj (Cic.CurrentProof ("questa",metasenv,bo,ty,[]))) ; flush stderr ;
    raise (InvokeTactics.RefreshProofException e)
 
+let set_proof_engine_goal g =
+ ProofEngine.goal := g
+;;
+
 let refresh_goals ?(empty_notebook=true) notebook =
  try
   match !ProofEngine.goal with
@@ -701,14 +705,13 @@ let load_unfinished_proof () =
         match CicParser.obj_of_xml prooffiletype (Some prooffile) with
            Cic.CurrentProof (_,metasenv,bo,ty,_) ->
             typecheck_loaded_proof metasenv bo ty ;
-            ProofEngine.set_proof
-             (Some (uri, metasenv, bo, ty)) ;
-            ProofEngine.goal :=
+            ProofEngine.set_proof (Some (uri, metasenv, bo, ty)) ;
+            refresh_proof output ;
+            set_proof_engine_goal
              (match metasenv with
                  [] -> None
                | (metano,_,_)::_ -> Some metano
              ) ;
-            refresh_proof output ;
             refresh_goals notebook ;
              output_html outputhtml
               ("<h1 color=\"Green\">Current proof type loaded from " ^
@@ -1581,7 +1584,7 @@ prerr_endline ("######################## " ^ xxx) ;
     let _  = CicTypeChecker.type_of_aux' metasenv [] expr in
      ProofEngine.set_proof
       (Some (!get_uri (), (1,[],expr)::metasenv, Cic.Meta (1,[]), expr)) ;
-     ProofEngine.goal := Some 1 ;
+     set_proof_engine_goal (Some 1) ;
      refresh_goals notebook ;
      refresh_proof output ;
      !save_set_sensitive true ;
@@ -1673,7 +1676,7 @@ let open_ () =
      in
       ProofEngine.set_proof
        (Some (uri, metasenv, bo, ty)) ;
-      ProofEngine.goal := None ;
+      set_proof_engine_goal None ;
       refresh_goals notebook ;
       refresh_proof output ;
       !save_set_sensitive true
@@ -2652,7 +2655,7 @@ object(self)
        if not skip then
         try
          let (metano,setgoal,page) = List.nth !pages i in
-          ProofEngine.goal := Some metano ;
+          set_proof_engine_goal (Some metano) ;
           Lazy.force (page#compute) ;
           Lazy.force setgoal;
           if notify_hbugs_on_goal_change then