X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=inline;f=matita%2Fcomponents%2Fng_tactics%2FnTactics.ml;h=b13de05d6d0c9ba1fb2d902ea52a74d35f5fb9af;hb=2e72565d67fee9207f4b08448a71d7b3ef815c20;hp=ac3dd00b7fa3b776ff4b139068e05ed7e5d93f77;hpb=aab0401db0bedd941da96a32acd600af3fbe42e7;p=helm.git diff --git a/matita/components/ng_tactics/nTactics.ml b/matita/components/ng_tactics/nTactics.ml index ac3dd00b7..b13de05d6 100644 --- a/matita/components/ng_tactics/nTactics.ml +++ b/matita/components/ng_tactics/nTactics.ml @@ -205,10 +205,10 @@ let compare_statuses ~past ~present = let exec tac (low_status : #lowtac_status) g = let stack = [ [0,Open g], [], [], `NoTag ] in let status = - (new NTacStatus.status low_status#obj stack)#set_estatus low_status + (new NTacStatus.status low_status#obj stack)#set_pstatus low_status in let status = tac status in - (low_status#set_estatus status)#set_obj status#obj + (low_status#set_pstatus status)#set_obj status#obj ;; let distribute_tac tac (status : #tac_status) = @@ -236,7 +236,7 @@ let distribute_tac tac (status : #tac_status) = in aux s go gc loc_tl in - let s0 = (new NTacStatus.status status#obj ())#set_estatus status in + let s0 = (new NTacStatus.status status#obj ())#set_pstatus status in let s0, go0, gc0 = s0, [], [] in let sn, gon, gcn = aux s0 go0 gc0 g in debug_print (lazy ("opened: " @@ -246,7 +246,7 @@ let distribute_tac tac (status : #tac_status) = let stack = (zero_pos gon, t @~- gcn, k @~- gcn, tag) :: deep_close gcn s in - ((status#set_stack stack)#set_obj(sn:>lowtac_status)#obj)#set_estatus sn + ((status#set_stack stack)#set_obj(sn:>lowtac_status)#obj)#set_pstatus sn ;; let atomic_tac htac: #tac_status as 'a -> 'a = distribute_tac (exec htac) ;; @@ -261,10 +261,13 @@ let repeat_tac t s = let try_tac tac status = + let try_tac status = try tac status with NTacStatus.Error _ -> status + in + atomic_tac try_tac status ;; let first_tac tacl status = @@ -371,7 +374,7 @@ let select0_tac ~where:(wanted,hyps,where) ~job = let status, instance = mk_meta status newgoalctx (`Decl newgoalty) `IsTerm in - instantiate status goal instance) + instantiate ~refine:false status goal instance) ;; let select_tac ~where ~job move_down_hyps = @@ -473,8 +476,6 @@ type indtyinfo = { rightno: int; leftno: int; consno: int; - lefts: NCic.term list; - rights: NCic.term list; reference: NReference.reference; } ;; @@ -482,7 +483,7 @@ type indtyinfo = { let ref_of_indtyinfo iti = iti.reference;; let analyze_indty_tac ~what indtyref = - distribute_tac (fun status goal -> + distribute_tac (fun (status as orig_status) goal -> let goalty = get_goalty status goal in let status, what = disambiguate status (ctx_of goalty) what None in let status, ty_what = typeof status (ctx_of what) what in @@ -490,10 +491,9 @@ let analyze_indty_tac ~what indtyref = let leftno = List.length lefts in let rightno = List.length rights in indtyref := Some { - rightno = rightno; leftno = leftno; consno = consno; - lefts = lefts; rights = rights; reference = r; + rightno = rightno; leftno = leftno; consno = consno; reference = r; }; - exec id_tac status goal) + exec id_tac orig_status goal) ;; let sort_of_goal_tac sortref = distribute_tac (fun status goal -> @@ -540,6 +540,7 @@ let rewrite_tac ~dir ~what:(_,_,what) ~where status = `LeftToRight -> "eq" ^ suffix ^ "_r" | `RightToLeft -> "eq" ^ suffix in + let what = Ast.Appl [what; Ast.Implicit `Vector] in block_tac [ select_tac ~where ~job:(`Substexpand 2) true; exact_tac