aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Herbelin2015-12-25 06:08:29 +0100
committerHugo Herbelin2015-12-25 10:59:24 +0100
commit1f2cc4026cd5e977979ff1507fd5fa0d96e1a92f (patch)
tree46a0d82265d2a9652853ca79b27ec16f4d761471
parent83b2b197eb33b78f2e3054819f1a36f971c24426 (diff)
Moving the ad hoc interpretation of "intros" as "intros **" from tacinterp.ml
to g_tactic.ml4 so as to leave room for "IntroPattern []" to mean "no introduction".
-rw-r--r--parsing/g_tactic.ml48
-rw-r--r--tactics/tacinterp.ml2
2 files changed, 8 insertions, 2 deletions
diff --git a/parsing/g_tactic.ml4 b/parsing/g_tactic.ml4
index a197e0209c..31125e37cf 100644
--- a/parsing/g_tactic.ml4
+++ b/parsing/g_tactic.ml4
@@ -281,6 +281,9 @@ GEXTEND Gram
intropatterns:
[ [ l = LIST0 nonsimple_intropattern -> l ]]
;
+ ne_intropatterns:
+ [ [ l = LIST1 nonsimple_intropattern -> l ]]
+ ;
or_and_intropattern:
[ [ "["; tc = LIST1 intropatterns SEP "|"; "]" -> tc
| "()" -> [[]]
@@ -532,7 +535,10 @@ GEXTEND Gram
simple_tactic:
[ [
(* Basic tactics *)
- IDENT "intros"; pl = intropatterns -> TacAtom (!@loc, TacIntroPattern pl)
+ IDENT "intros"; pl = ne_intropatterns ->
+ TacAtom (!@loc, TacIntroPattern pl)
+ | IDENT "intros" ->
+ TacAtom (!@loc, TacIntroPattern [!@loc,IntroForthcoming false])
| IDENT "intro"; id = ident; hto = move_location ->
TacAtom (!@loc, TacIntroMove (Some id, hto))
| IDENT "intro"; hto = move_location -> TacAtom (!@loc, TacIntroMove (None, hto))
diff --git a/tactics/tacinterp.ml b/tactics/tacinterp.ml
index 8c8861fd99..d96c8f98a2 100644
--- a/tactics/tacinterp.ml
+++ b/tactics/tacinterp.ml
@@ -1775,7 +1775,7 @@ and interp_atomic ist tac : unit Proofview.tactic =
(TacIntroPattern l)
(* spiwack: print uninterpreted, not sure if it is the
expected behaviour. *)
- (Tactics.intros_patterns l')) sigma
+ (Tactics.intro_patterns l')) sigma
end }
| TacIntroMove (ido,hto) ->
Proofview.Goal.enter { enter = begin fun gl ->