]> matita.cs.unibo.it Git - helm.git/commitdiff
Bug fixed: "intros n" should fail when there are less than n products or
authorClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Wed, 6 Jul 2005 17:20:23 +0000 (17:20 +0000)
committerClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Wed, 6 Jul 2005 17:20:23 +0000 (17:20 +0000)
let-ins. In particular "intro" should fail if the goal is not a product or
a let-in.

helm/ocaml/tactics/primitiveTactics.ml

index 06e83a125335ea218df3a3e25f2c02f197910397..1b5f407bc31c2cdfddd5814c7346dc5c64b5a6b0 100644 (file)
@@ -61,10 +61,13 @@ let lambda_abstract ?(howmany=(-1)) metasenv context newmeta ty mk_fresh_name =
          in
           (context',ty,C.LetIn(n,s,bo))
       | _ as t ->
-        let irl =
+        if howmany <= 0 then
+         let irl =
           CicMkImplicit.identity_relocation_list_for_metavariable context
-        in
-         context, t, (C.Meta (newmeta,irl))
+         in
+          context, t, (C.Meta (newmeta,irl))
+        else
+         raise (Fail "intro(s): not enough products or let-ins")
   in
    collect_context context howmany ty