diff --git a/theories/proofmode/spec_patterns.v b/theories/proofmode/spec_patterns.v index 16d5d6f05c69904d7df19e3b33c4dfd08b08a552..8c1d836d3d1d6892734aea8eba1b70faae9b057c 100644 --- a/theories/proofmode/spec_patterns.v +++ b/theories/proofmode/spec_patterns.v @@ -12,7 +12,8 @@ Inductive spec_pat := | SGoal : spec_goal → spec_pat | SGoalPersistent : spec_pat | SGoalPure : spec_pat - | SName : string → spec_pat. + | SName : string → spec_pat + | SForall : spec_pat. Module spec_pat. Inductive token := @@ -22,6 +23,7 @@ Inductive token := | TBracketR : token | TPersistent : token | TPure : token + | TForall : token | TModal : token | TFrame : token. @@ -35,6 +37,7 @@ Fixpoint tokenize_go (s : string) (k : list token) (kn : string) : list token := | String "]" s => tokenize_go s (TBracketR :: cons_name kn k) "" | String "#" s => tokenize_go s (TPersistent :: cons_name kn k) "" | String "%" s => tokenize_go s (TPure :: cons_name kn k) "" + | String "*" s => tokenize_go s (TForall :: cons_name kn k) "" | String ">" s => tokenize_go s (TModal :: cons_name kn k) "" | String "$" s => tokenize_go s (TFrame :: cons_name kn k) "" | String a s => @@ -57,6 +60,7 @@ Fixpoint parse_go (ts : list token) (k : list spec_pat) : option (list spec_pat) | TBracketL :: ts => parse_goal ts (SpecGoal false false [] []) k | TModal :: TBracketL :: ts => parse_goal ts (SpecGoal true false [] []) k | TModal :: ts => parse_go ts (SGoal (SpecGoal true true [] []) :: k) + | TForall :: ts => parse_go ts (SForall :: k) | _ => None end with parse_goal (ts : list token) (g : spec_goal) diff --git a/theories/proofmode/tactics.v b/theories/proofmode/tactics.v index e84c9e2f869f85b0b058aef16261078e72d36989..844c3d69a77a08bdefea0fcbc302c7679d29b624 100644 --- a/theories/proofmode/tactics.v +++ b/theories/proofmode/tactics.v @@ -285,6 +285,9 @@ Local Tactic Notation "iSpecializePat" constr(H) constr(pat) := let rec go H1 pats := lazymatch pats with | [] => idtac + | SForall :: ?pats => + idtac "the * specialization pattern is deprecated because it is applied implicitly"; + go H1 pats | SName ?H2 :: ?pats => eapply tac_specialize with _ _ H2 _ H1 _ _ _ _; (* (j:=H1) (i:=H2) *) [env_cbv; reflexivity || fail "iSpecialize:" H2 "not found"