]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/components/tactics/declarative.ml
something was really too slow...
[helm.git] / helm / software / components / tactics / declarative.ml
index 24801542dabcb76f57a6684a6d60fccaef31a488..8e077c6bd7e2d289f71763bbff9f183cbfd0a0d6 100644 (file)
@@ -63,18 +63,24 @@ let by_term_we_proved ~dbd ~universe t ty id ty' =
             ~continuation:just
       )
    | Some id ->
-       let continuation =
+       let ty',continuation =
         match ty' with
-           None -> Tacticals.id_tac
+           None -> ty,just
          | Some ty' ->
-             Tactics.change ~pattern:(None,[id,Cic.Implicit (Some `Hole)],None)
-              (fun _ metasenv ugraph -> ty',metasenv,ugraph)
+            ty',
+            Tacticals.then_
+             ~start:
+               (Tactics.change
+                 ~with_cast:true
+                 ~pattern:(None,[id,Cic.Implicit (Some `Hole)],None)
+                 (fun _ metasenv ugraph -> ty,metasenv,ugraph))
+             ~continuation:just
        in
         Tacticals.thens
         ~start:
-          (Tactics.cut ty
+          (Tactics.cut ty'
             ~mk_fresh_name_callback:(fun _ _ _  ~typ -> Cic.Name id))
-        ~continuations:[ continuation ; just ]
+        ~continuations:[ Tacticals.id_tac ; continuation ]
 ;;
 
 let bydone ~dbd ~universe t =
@@ -193,6 +199,8 @@ let rewritingstep ~dbd ~universe lhs rhs just last_step =
               ~universe:(Universe.index Universe.empty 
                  (Universe.key ty) just) ~steps:1 ()
          (* Tactics.apply just *)
+    | `Proof ->
+        Tacticals.id_tac
   in
    let plhs,prhs,prepare =
     match lhs with