diff options
| author | Jason Gross | 2020-03-18 14:56:40 -0400 |
|---|---|---|
| committer | Jason Gross | 2020-03-18 14:56:40 -0400 |
| commit | a1315d78a5b3c6095848298f03ca328380a7d453 (patch) | |
| tree | 5103c662905cb78e1e3bdc75179eba1366bb4cb8 /test-suite/ltac2 | |
| parent | fb7292570380e0490d7c74db1718725149996ffd (diff) | |
| parent | de9f75fcca7247abadbc02176a1fe06033cd6e38 (diff) | |
Merge PR #11607: Hide binder type in Ltac2
Reviewed-by: JasonGross
Ack-by: SkySkimmer
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. |
