diff options
| author | Pierre-Marie Pédrot | 2020-03-08 00:29:28 +0100 |
|---|---|---|
| committer | Pierre-Marie Pédrot | 2020-03-08 00:29:28 +0100 |
| commit | 47a65ee1db1ea8320e27da880f53cfa87d8e0f99 (patch) | |
| tree | d04a6c225d2b9726d37cd8c9d2adeadd87c7b766 /user-contrib | |
| parent | ad40a570408de806a2af2ce96241c74c91d90951 (diff) | |
| parent | 9168e0e23142ccafbe8b6272551dbb739f72ae95 (diff) | |
Merge PR #11740: Ltac2: Add notation for enough and eenough
Reviewed-by: ppedrot
Diffstat (limited to 'user-contrib')
| -rw-r--r-- | user-contrib/Ltac2/Notations.v | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/user-contrib/Ltac2/Notations.v b/user-contrib/Ltac2/Notations.v index b650c1a2ec..d6bf4a28ba 100644 --- a/user-contrib/Ltac2/Notations.v +++ b/user-contrib/Ltac2/Notations.v @@ -265,6 +265,19 @@ Ltac2 Notation "assert" ast(thunk(assert)) := assert0 false ast. Ltac2 Notation "eassert" ast(thunk(assert)) := assert0 true ast. +Ltac2 enough_from_assertion(a : Std.assertion) := + match a with + | Std.AssertType ip_opt term tac_opt => Std.enough term (Some tac_opt) ip_opt + | Std.AssertValue ident constr => Std.pose (Some ident) constr + end. + +Ltac2 enough0 ev ast := + enter_h ev (fun _ ast => enough_from_assertion ast) ast. + +Ltac2 Notation "enough" ast(thunk(assert)) := enough0 false ast. + +Ltac2 Notation "eenough" ast(thunk(assert)) := enough0 true ast. + Ltac2 default_everywhere cl := match cl with | None => { Std.on_hyps := None; Std.on_concl := Std.AllOccurrences } |
