aboutsummaryrefslogtreecommitdiffhomepage
path: root/test-suite/bugs/closed/3439.v
diff options
context:
space:
mode:
authorGravatar Matthieu Sozeau <mattam@mattam.org>2014-07-30 16:27:38 +0200
committerGravatar Matthieu Sozeau <mattam@mattam.org>2014-07-30 16:27:38 +0200
commit0f7e73691dc043f17cf404f9ebbd4185e614e7d3 (patch)
treebeb0e974eb2d7dce3f6908ed06d21b37e57e257f /test-suite/bugs/closed/3439.v
parent62175a1b14c8db7d92ea49d7442434ea60c4d1a1 (diff)
Add test-suite file for bug #3439.
Diffstat (limited to 'test-suite/bugs/closed/3439.v')
-rw-r--r--test-suite/bugs/closed/3439.v43
1 files changed, 43 insertions, 0 deletions
diff --git a/test-suite/bugs/closed/3439.v b/test-suite/bugs/closed/3439.v
new file mode 100644
index 000000000..bba6140f7
--- /dev/null
+++ b/test-suite/bugs/closed/3439.v
@@ -0,0 +1,43 @@
+(* File reduced by coq-bug-finder from original input, then from 3154 lines to 149 lines, then from 89 lines to 55 lines, then from 44 lines to 20 lines *)
+Set Primitive Projections.
+Generalizable All Variables.
+Axiom IsHSet : Type -> Type.
+Existing Class IsHSet.
+Record PreCategory := { object :> Type }.
+Notation IsStrictCategory C := (IsHSet (object C)).
+Instance trunc_prod `{IsHSet A} `{IsHSet B} : IsHSet (A * B) | 100.
+admit.
+Defined.
+Typeclasses Transparent object.
+Definition prod (C D : PreCategory) : PreCategory := Build_PreCategory (Datatypes.prod C D).
+Global Instance isstrict_category_product `{IsStrictCategory C, IsStrictCategory D} : IsStrictCategory (prod C D).
+Proof.
+ typeclasses eauto.
+Defined.
+
+
+Set Typeclasses Debug.
+(* File reduced by coq-bug-finder from original input, then from 7425 lines to 154 lines, then from 116 lines to 20 lines *)
+Class Contr (A : Type) := { center : A }.
+Instance contr_unit : Contr unit | 0 := {| center := tt |}.
+Module non_prim.
+ Unset Primitive Projections.
+ Record PreCategory := { object :> Type }.
+ Lemma foo : Contr (object (@Build_PreCategory unit)).
+ Proof.
+ solve [ simpl; typeclasses eauto ] || fail "goal not solved".
+ Undo.
+ solve [ typeclasses eauto ].
+ Defined.
+End non_prim.
+
+Module prim.
+ Set Primitive Projections.
+ Record PreCategory := { object :> Type }.
+ Lemma foo : Contr (object (@Build_PreCategory unit)).
+ Proof.
+ solve [ simpl; typeclasses eauto ] || fail "goal not solved".
+ Undo.
+ solve [ typeclasses eauto ]. (* Error: No applicable tactic. *)
+ Defined.
+End prim. \ No newline at end of file