diff options
Diffstat (limited to 'test-suite/ltac2')
| -rw-r--r-- | test-suite/ltac2/binder.v | 37 | ||||
| -rw-r--r-- | test-suite/ltac2/constr.v | 4 |
2 files changed, 39 insertions, 2 deletions
diff --git a/test-suite/ltac2/binder.v b/test-suite/ltac2/binder.v new file mode 100644 index 0000000000..eac74688b2 --- /dev/null +++ b/test-suite/ltac2/binder.v @@ -0,0 +1,37 @@ +Require Import Ltac2.Ltac2. + +Ltac2 check () := +let t := Control.goal () in +match Constr.Unsafe.kind t with +| Constr.Unsafe.Prod b t => + let na := Constr.Binder.name b in + let u := Constr.Binder.type b in + let b := Constr.Binder.make na u in + let c := Constr.Unsafe.make (Constr.Unsafe.Prod b t) in + pose (v := $c); + refine '(_ : &v); + unfold &v +| _ => fail +end. + +Goal forall x : nat, x = x. +Proof. +check (); intros; reflexivity. +Qed. + +Goal forall x : Type, x = x. +Proof. +check (); intros; reflexivity. +Qed. + +Goal forall x : Set, x = x. +Proof. +check (); intros; reflexivity. +Qed. + +Inductive True : SProp := I. + +Goal forall x : True, True. +Proof. +check (); intros; constructor. +Qed. diff --git a/test-suite/ltac2/constr.v b/test-suite/ltac2/constr.v index 39601d99a8..018596ed95 100644 --- a/test-suite/ltac2/constr.v +++ b/test-suite/ltac2/constr.v @@ -2,11 +2,11 @@ Require Import Ltac2.Constr Ltac2.Init Ltac2.Control. Import Unsafe. Ltac2 Eval match (kind '(nat -> bool)) with - | Prod a b c => a + | Prod a c => a | _ => throw Match_failure end. Set Allow StrictProp. Axiom something : SProp. Ltac2 Eval match (kind '(forall x : something, bool)) with - | Prod a b c => a + | Prod a c => a | _ => throw Match_failure end. |
