Debian Codegraph @

test-suite/bugs/bug_20695.v

raw
1 Axiom Z : Set.
2 Class ops (T:Type).
3 Definition Zops:@ops Z. Admitted.
4
5 Module A.
6 #[global] (* changing this global to export makes the second pose succeed *)
7 Existing Instance Zops.
8 #[export]
9 Existing Instance Zops.
10 End A.
11
12 Module Import B.
13 #[export] Instance Tops T: @ops T := {}.
14 End B.
15
16 Fail Type _ : ops _.
17 (* picked Tops which leaves an unsolved evar for T *)
18
19 Import A.
20
21 Type _ : ops _.
22 (* picked Zops *)
23
24 Remove Hints Zops : typeclass_instances.
25
26 Fail Type _ : ops _.
27 (* picked Tops *)
28
29 Import A.
30 (* was bugged: import incorrectly thought zops was still a hint
31 so didn't add it again *)
32
33 Type _ : ops _.
34 (* should pick Zops *)