]> matita.cs.unibo.it Git - helm.git/commitdiff
New argument for LApply: the ident for the generated hypothesis.
authorClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Tue, 28 Jun 2005 09:11:19 +0000 (09:11 +0000)
committerClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Tue, 28 Jun 2005 09:11:19 +0000 (09:11 +0000)
helm/ocaml/cic_disambiguation/cicTextualParser2.ml
helm/ocaml/cic_transformations/tacticAst.ml
helm/ocaml/cic_transformations/tacticAstPp.ml

index 0ef9ec617f2ba7a0ea3e9f1a9b689e5aaba735ab..0bb6b3222c5bd6460250bbde036a8778adf0ff9a 100644 (file)
@@ -408,8 +408,9 @@ EXTEND
         let idents = match ident with None -> [] | Some id -> [id] in
         TacticAst.Intros (loc, Some 1, idents)
     | IDENT "lapply"; what = tactic_term; 
-      to_what = OPT [ "to" ; t = tactic_term -> t ] ->
-        TacticAst.LApply (loc, to_what, what)
+      to_what = OPT [ "to" ; t = tactic_term -> t ];
+      ident = OPT [ "using" ; id = IDENT -> id ] ->
+        TacticAst.LApply (loc, to_what, what, ident)
     | IDENT "left" -> TacticAst.Left loc
     | IDENT "letin"; where = IDENT ; SYMBOL <:unicode<def>> ; t = tactic_term ->
         TacticAst.LetIn (loc, t, where)
index 7622ce963c12f654ceade2d519153c98228feaa1..1525cfd8b7f132315dffbf3c8c4a4e5672924d08 100644 (file)
@@ -59,7 +59,7 @@ type ('term, 'ident) tactic =
   | IdTac of loc
   | Injection of loc * 'term
   | Intros of loc * int option * 'ident list
-  | LApply of loc * 'term option * 'term
+  | LApply of loc * 'term option * 'term * 'ident option
   | Left of loc
   | LetIn of loc * 'term * 'ident
   | Reduce of loc * reduction_kind * ('term, 'ident) pattern 
index 452976e59fde7f99e63abb7b2fd75260b56da2fb..bc4346e91c7b29646da92164e72b6fa25e865fdd 100644 (file)
@@ -119,9 +119,10 @@ let rec pp_tactic = function
   | Symmetry _ -> "symmetry"
   | Transitivity (_, term) -> "transitivity " ^ pp_term_ast term
   | FwdSimpl (_, term) -> sprintf "fwd %s" (pp_term_ast term)
-  | LApply (_, term_opt, term) -> 
-      sprintf "lapply %s%s" (pp_term_ast term) 
-        (match term_opt with | None -> "" | Some t -> " to " ^ pp_term_ast t)
+  | LApply (_, term_opt, term, ident) -> 
+      sprintf "lapply %s%s%s" (pp_term_ast term) 
+        (match term_opt with None -> "" | Some t -> " to " ^ pp_term_ast t)
+        (match ident with None -> "" | Some id -> " " ^ id)
 
 let pp_flavour = function
   | `Definition -> "Definition"