X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fcomponents%2Ftactics%2Ftacticals.ml;h=4a4f150b7bf3e27eb6d7beacdc50df2d84c4d82e;hb=0e3324ad8e6a552ee89f02371412f7bc2e83379f;hp=f647ebccaa9d199181761b2233c59f00ace13f1d;hpb=a09cd4c4c08494249b2af35940c217599130507c;p=helm.git diff --git a/helm/software/components/tactics/tacticals.ml b/helm/software/components/tactics/tacticals.ml index f647ebcca..4a4f150b7 100644 --- a/helm/software/components/tactics/tacticals.ml +++ b/helm/software/components/tactics/tacticals.ml @@ -290,16 +290,18 @@ let solve_tactics ~tactics = let progress_tactic ~tactic = let msg = lazy "Failed to progress" in - let progress_tactic (((_,metasenv,_subst,_,_,_),_) as istatus) = - let ((_,metasenv',_subst,_,_,_),_) as ostatus = + let progress_tactic (((_,metasenv,_subst,_,_,_),g) as istatus) = + let ((_,metasenv',_subst,_,_,_),opened) as ostatus = PET.apply_tactic tactic istatus in - (*CSC: Warning - If just the index of some metas changes the tactic is recognized - as a progressing one. This is wrong. *) - if metasenv' = metasenv then - raise (PET.Fail msg) - else - ostatus + match opened with + | [g1] -> + let _,oc,oldty = CicUtil.lookup_meta g metasenv in + let _,nc,newty = CicUtil.lookup_meta g1 metasenv' in + if oldty = newty && oc = nc then + raise (PET.Fail msg) + else + ostatus + | _ -> ostatus in PET.mk_tactic progress_tactic