Debian Codegraph @

test-suite/bugs/bug_10762.v

raw
1
2 Set Implicit Arguments.
3
4 Generalizable Variables A B.
5 Parameter val: Type.
6
7 Class Enc (A:Type) : Type :=
8 make_Enc { enc : A -> val }.
9
10 #[export] Hint Mode Enc + : typeclass_instances.
11
12 Parameter bar : forall A (EA:Enc A), EA = EA.
13
14 Parameter foo : forall (P:Prop),
15 P ->
16 P = P ->
17 True.
18
19 Parameter id : forall (P:Prop),
20 P -> P.
21
22 Check enc.
23
24 Lemma test : True.
25 eapply foo; [ eapply bar | apply id]. apply id.
26 (* eapply bar introduces an unresolved typeclass evar that is no longer
27 a candidate after the application (eapply should leave typeclass goals shelved).
28 We ensure that this happens also _across_ goals in `[ | ]` and not only at `.`..
29 *)
30 Abort.