]> matita.cs.unibo.it Git - helm.git/commitdiff
Bug fixed: a ~with_cast is now inserted when appropriate to avoid translation
authorClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Wed, 4 Jul 2007 20:19:24 +0000 (20:19 +0000)
committerClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Wed, 4 Jul 2007 20:19:24 +0000 (20:19 +0000)
of a bottom-up conversion into a top-down conversion.

helm/software/components/tactics/declarative.ml

index b0615edb36c728415c5a03e8926278f03c3006a3..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 =