X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=sidebyside;f=helm%2Focaml%2Ftactics%2FintroductionTactics.ml;h=9ed3647c1306370a3aa3096f5489ffab81c15828;hb=ac595177011c8fd73c39fb9b5aaf8b130fb03ef3;hp=b425f219af8585778f7b1a1bcc27fd57c774be39;hpb=f5b6be7239a35e1d0aba504605b5a0df5cf06726;p=helm.git diff --git a/helm/ocaml/tactics/introductionTactics.ml b/helm/ocaml/tactics/introductionTactics.ml index b425f219a..9ed3647c1 100644 --- a/helm/ocaml/tactics/introductionTactics.ml +++ b/helm/ocaml/tactics/introductionTactics.ml @@ -23,8 +23,9 @@ * http://cs.unibo.it/helm/. *) +(* $Id$ *) -let constructor_tac ~n ~status:(proof, goal) = +let fake_constructor_tac ~n (proof, goal) = let module C = Cic in let module R = CicReduction in let (_,metasenv,_,_) = proof in @@ -32,29 +33,17 @@ let constructor_tac ~n ~status:(proof, goal) = 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) - | _ -> raise (ProofEngineTypes.Fail "Constructor: failed") + ProofEngineTypes.apply_tactic ( + PrimitiveTactics.apply_tac + ~term: (C.MutConstruct (uri, typeno, n, exp_named_subst))) + (proof, goal) + | _ -> raise (ProofEngineTypes.Fail (lazy "Constructor: failed")) ;; +let constructor_tac ~n = ProofEngineTypes.mk_tactic (fake_constructor_tac ~n) -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 = ProofEngineTypes.mk_tactic (fake_constructor_tac ~n:1) ;; +let split_tac = ProofEngineTypes.mk_tactic (fake_constructor_tac ~n:1) ;; +let left_tac = ProofEngineTypes.mk_tactic (fake_constructor_tac ~n:1) ;; +let right_tac = ProofEngineTypes.mk_tactic (fake_constructor_tac ~n:2) ;;