diff options
| author | Pierre-Marie Pédrot | 2021-03-24 11:22:14 +0100 |
|---|---|---|
| committer | Pierre-Marie Pédrot | 2021-03-24 11:22:14 +0100 |
| commit | ccb078536c89a9c36f32c416495de222faf5fd79 (patch) | |
| tree | ced0f53b7a9ec1f0a22d0e3bd9facf65d39dd67d /test-suite | |
| parent | 06351e34d8cd43b26615e1a490d815e7bf6b934a (diff) | |
| parent | 2420764db089d731635787bc11bd9ab312250fe7 (diff) | |
Merge PR #13968: implement is_const, is_var, ... etc and has_evar for Ltac2
Reviewed-by: ppedrot
Diffstat (limited to 'test-suite')
| -rw-r--r-- | test-suite/ltac2/evar.v | 17 | ||||
| -rw-r--r-- | test-suite/ltac2/rebind.v | 4 |
2 files changed, 18 insertions, 3 deletions
diff --git a/test-suite/ltac2/evar.v b/test-suite/ltac2/evar.v new file mode 100644 index 0000000000..2c82673edd --- /dev/null +++ b/test-suite/ltac2/evar.v @@ -0,0 +1,17 @@ +Require Import Ltac2.Ltac2. + +Goal exists (a: nat), a = 1. +Proof. + match! goal with + | [ |- ?g ] => Control.assert_false (Constr.has_evar g) + end. + eexists. + match! goal with + | [ |- ?g ] => Control.assert_true (Constr.has_evar g) + end. + match! goal with + | [ |- ?x = ?y ] => + Control.assert_true (Constr.is_evar x); + Control.assert_false (Constr.is_evar y) + end. +Abort. diff --git a/test-suite/ltac2/rebind.v b/test-suite/ltac2/rebind.v index 7b3a460c8c..9108871e28 100644 --- a/test-suite/ltac2/rebind.v +++ b/test-suite/ltac2/rebind.v @@ -26,12 +26,10 @@ Ltac2 rec nat_eq n m := | S n => match m with | O => false | S m => nat_eq n m end end. -Ltac2 Type exn ::= [ Assertion_failed ]. - Ltac2 assert_eq n m := match nat_eq n m with | true => () - | false => Control.throw Assertion_failed end. + | false => Control.throw Assertion_failure end. Ltac2 mutable x := O. Ltac2 y := x. |
