aboutsummaryrefslogtreecommitdiffhomepage
path: root/test-suite
diff options
context:
space:
mode:
authorGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2018-07-03 13:32:50 +0200
committerGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2018-07-03 13:32:50 +0200
commitc17b3248f3473ec464ab19196558533f621d796c (patch)
treee3daa536a4db6f8fbd64a1c570f1f33a47302a3e /test-suite
parent4deb788a24b50eec3da66ed32bb85c185123c007 (diff)
parentbc5304a91cf4627063551422ad6e5a2cd1059897 (diff)
Merge PR #7820: [hints] Add Hint Variables/Constants Opaque/Transparent commands
Diffstat (limited to 'test-suite')
-rw-r--r--test-suite/success/Hints.v30
1 files changed, 30 insertions, 0 deletions
diff --git a/test-suite/success/Hints.v b/test-suite/success/Hints.v
index 717dc0deb..ebf5b094e 100644
--- a/test-suite/success/Hints.v
+++ b/test-suite/success/Hints.v
@@ -183,3 +183,33 @@ End HintCut.
Goal forall (m : nat), exists n, m = n /\ m = n.
intros m; eexists; split; [trivial | reflexivity].
Qed.
+
+Section HintTransparent.
+
+ Definition fn (x : nat) := S x.
+
+ Create HintDb trans.
+
+ Hint Resolve eq_refl | (_ = _) : trans.
+
+ (* No reduction *)
+ Hint Variables Opaque : trans. Hint Constants Opaque : trans.
+
+ Goal forall x : nat, fn x = S x.
+ Proof.
+ intros.
+ Fail typeclasses eauto with trans.
+ unfold fn.
+ typeclasses eauto with trans.
+ Qed.
+
+ (** Now allow unfolding fn *)
+ Hint Constants Transparent : trans.
+
+ Goal forall x : nat, fn x = S x.
+ Proof.
+ intros.
+ typeclasses eauto with trans.
+ Qed.
+
+End HintTransparent.