]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/tactics/primitiveTactics.ml
Got rid of a few warnings.
[helm.git] / helm / ocaml / tactics / primitiveTactics.ml
index e2fac6167bae90cd10c8e8c5df2b3a2eadaab434..7bbdbf6b068ece8400f291b3fc459a115076ba8a 100644 (file)
@@ -26,9 +26,8 @@
 open ProofEngineHelpers
 open ProofEngineTypes
 
+exception TheTypeOfTheCurrentGoalIsAMetaICannotChooseTheRightElimiantionPrinciple
 exception NotAnInductiveTypeToEliminate
-exception NotTheRightEliminatorShape
-exception NoHypothesesFound
 exception WrongUriToVariable of string
 
 (* lambda_abstract newmeta ty *)
@@ -406,7 +405,7 @@ let intros_tac ?howmany ?(mk_fresh_name_callback = FreshNamesGenerator.mk_fresh_
  in
   mk_tactic (intros_tac ~mk_fresh_name_callback ())
   
-let cut_tac?(mk_fresh_name_callback = FreshNamesGenerator.mk_fresh_name ~subst:[]) ~term=
+let cut_tac ?(mk_fresh_name_callback = FreshNamesGenerator.mk_fresh_name ~subst:[]) term =
  let cut_tac
   ?(mk_fresh_name_callback = FreshNamesGenerator.mk_fresh_name ~subst:[])
   term (proof, goal)
@@ -441,7 +440,7 @@ let cut_tac?(mk_fresh_name_callback = FreshNamesGenerator.mk_fresh_name ~subst:[
  in
   mk_tactic (cut_tac ~mk_fresh_name_callback term)
 
-let letin_tac ?(mk_fresh_name_callback=FreshNamesGenerator.mk_fresh_name ~subst:[]) ~term=
+let letin_tac ?(mk_fresh_name_callback=FreshNamesGenerator.mk_fresh_name ~subst:[]) term =
  let letin_tac
   ?(mk_fresh_name_callback = FreshNamesGenerator.mk_fresh_name ~subst:[])
   term (proof, goal)
@@ -527,6 +526,7 @@ let elim_tac ~term =
         | C.Sort C.Set  -> "_rec"
         | C.Sort C.CProp -> "_rec"
         | C.Sort (C.Type _)-> "_rect" 
+        | C.Meta (_,_) -> raise TheTypeOfTheCurrentGoalIsAMetaICannotChooseTheRightElimiantionPrinciple
         | _ -> assert false
       in
        U.uri_of_string (buri ^ "/" ^ name ^ ext ^ ".con")