X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2Ftactics%2FintroductionTactics.ml;h=9751b2b7478fdf0d05dc74ea092fbfc1b60c6774;hb=e76b78d1d80796de1b8f6a469741cbd26cd4d822;hp=6318f489041d48e02e9590c501c53ff1a9e5cee1;hpb=bac72fcaa876137ab7a5630e0c1badc2a627dce8;p=helm.git diff --git a/helm/ocaml/tactics/introductionTactics.ml b/helm/ocaml/tactics/introductionTactics.ml index 6318f4890..9751b2b74 100644 --- a/helm/ocaml/tactics/introductionTactics.ml +++ b/helm/ocaml/tactics/introductionTactics.ml @@ -23,38 +23,22 @@ * http://cs.unibo.it/helm/. *) - -let constructor_tac ~n ~status:(proof, goal) = +let constructor_tac ~n (proof, goal) = let module C = Cic in let module R = CicReduction in let (_,metasenv,_,_) = proof in - let metano,context,ty = List.find (function (m,_,_) -> m=goal) metasenv in + let metano,context,ty = CicUtil.lookup_meta goal metasenv in match (R.whd context ty) with (C.MutInd (uri, typeno, exp_named_subst)) | (C.Appl ((C.MutInd (uri, typeno, exp_named_subst))::_)) -> PrimitiveTactics.apply_tac ~term: (C.MutConstruct (uri, typeno, n, exp_named_subst)) - ~status:(proof, goal) + (proof, goal) | _ -> raise (ProofEngineTypes.Fail "Constructor: failed") ;; - -let exists_tac ~status = - constructor_tac ~n:1 ~status -;; - - -let split_tac ~status = - constructor_tac ~n:1 ~status -;; - - -let left_tac ~status = - constructor_tac ~n:1 ~status -;; - - -let right_tac ~status = - constructor_tac ~n:2 ~status -;; +let exists_tac status = constructor_tac ~n:1 status ;; +let split_tac status = constructor_tac ~n:1 status ;; +let left_tac status = constructor_tac ~n:1 status ;; +let right_tac status = constructor_tac ~n:2 status ;;