]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/matita/matitaMathView.ml
Added problems from CASC 208
[helm.git] / helm / software / matita / matitaMathView.ml
index 277dbe8f1d0361eafdbebff1a34270bd7ef27799..f00ea1a0fe89be0f6859ce7d91141579f5314534 100644 (file)
@@ -798,9 +798,9 @@ class sequentsViewer ~(notebook:GPack.notebook) ~(cicMathView:cicMathView) () =
           self#script#setGoal (Some (goal_of_switch goal_switch));
           self#render_page ~page ~goal_switch))
 
-    method nload_sequents 
-      { NTacStatus.istatus = { NTacStatus.pstatus = (_,_,metasenv,subst,_) }; gstatus = stack } 
-    =
+    method nload_sequents : 'status. #NTacStatus.tac_status as 'status -> unit
+    = fun status ->
+     let _,_,metasenv,subst,_ = status#obj in
       _metasenv <- `New (metasenv,subst);
       pages <- 0;
       let win goal_switch =
@@ -825,7 +825,7 @@ class sequentsViewer ~(notebook:GPack.notebook) ~(cicMathView:cicMathView) () =
         w#coerce
       in
       assert (
-        let stack_goals = Stack.open_goals stack in
+        let stack_goals = Stack.open_goals status#stack in
         let proof_goals = List.map fst metasenv in
         if
           HExtlib.list_uniq (List.sort Pervasives.compare stack_goals)
@@ -863,13 +863,13 @@ class sequentsViewer ~(notebook:GPack.notebook) ~(cicMathView:cicMathView) () =
             match depth, pos with
             | 0, 0 -> `Current (render_switch sw)
             | 0, _ -> `Shift (pos, `Current (render_switch sw))
-            | 1, pos when Stack.head_tag stack = `BranchTag ->
+            | 1, pos when Stack.head_tag status#stack = `BranchTag ->
                 `Shift (pos, render_switch sw)
             | _ -> render_switch sw
           in
           add_tab markup sw)
         ~cont:add_switch ~todo:add_switch
-        stack;
+        status#stack;
       switch_page_callback <-
         Some (notebook#connect#switch_page ~callback:(fun page ->
           let goal_switch =
@@ -1335,7 +1335,7 @@ class cicBrowser_impl ~(history:MatitaTypes.mathViewer_entry MatitaMisc.history)
 
     method private home () =
       self#_showMath;
-      match self#script#grafite_status.proof_status with
+      match self#script#grafite_status#proof_status with
       | Proof  (uri, metasenv, _subst, bo, ty, attrs) ->
          let name = UriManager.name_of_uri (HExtlib.unopt uri) in
          let obj =
@@ -1349,10 +1349,8 @@ class cicBrowser_impl ~(history:MatitaTypes.mathViewer_entry MatitaMisc.history)
          in
           self#_loadObj obj
       | _ ->
-        match self#script#grafite_status.ng_status with
-           ProofMode tstatus ->
-            let nobj = tstatus.NTacStatus.istatus.NTacStatus.pstatus in
-             self#_loadNObj nobj
+        match self#script#grafite_status#ng_mode with
+           `ProofMode -> self#_loadNObj self#script#grafite_status#obj
          | _ -> self#blank ()
 
       (** loads a cic uri from the environment