diff options
| author | Jason Gross | 2016-06-10 19:12:49 -0400 |
|---|---|---|
| committer | Jason Gross | 2017-04-25 15:13:25 -0400 |
| commit | 5f3d20dc53ffd0537a84c93acd761c3c69081342 (patch) | |
| tree | b82efa45c4430b08562b91cf028edef17b97fe34 /test-suite | |
| parent | 11aaa1fd8230a347f1dca1a0f349ea7c7f2768c3 (diff) | |
Add transparent_abstract tactic
Diffstat (limited to 'test-suite')
| -rw-r--r-- | test-suite/success/transparent_abstract.v | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test-suite/success/transparent_abstract.v b/test-suite/success/transparent_abstract.v new file mode 100644 index 0000000000..ff4509c4a8 --- /dev/null +++ b/test-suite/success/transparent_abstract.v @@ -0,0 +1,21 @@ +Class by_transparent_abstract {T} (x : T) := make_by_transparent_abstract : T. +Hint Extern 0 (@by_transparent_abstract ?T ?x) => change T; transparent_abstract exact_no_check x : typeclass_instances. + +Goal True /\ True. +Proof. + split. + transparent_abstract exact I using foo. + let x := (eval hnf in foo) in constr_eq x I. + let x := constr:(ltac:(constructor) : True) in + let T := type of x in + let x := constr:(_ : by_transparent_abstract x) in + let x := (eval cbv delta [by_transparent_abstract] in (let y : T := x in y)) in + pose x as x'. + simpl in x'. + let v := eval cbv [x'] in x' in tryif constr_eq v I then fail 0 else idtac. + hnf in x'. + let v := eval cbv [x'] in x' in tryif constr_eq v I then idtac else fail 0. + exact x'. +Defined. +Check eq_refl : I = foo. +Eval compute in foo. |
