Debian Codegraph @

test-suite/bugs/bug_6714.v

raw
1 Set Typeclasses Unique Instances.
2
3 Class Foo (x y : bool) := {}.
4 Class Bar (x y : bool) := {}.
5 Class Bax (x : bool) := {}.
6
7 Instance bar_1 : Bar true false := {}.
8 Instance bar_2 : Bar true true := {}.
9
10 Instance bax_1 : Bax false := {}.
11
12 Instance foo x y : Bar x y -> Bax y -> Foo x y := {}.
13
14 Typeclasses eauto := debug.
15
16 Fail Definition bla : Foo true _ := _.
17
18 (*
19 Debug: Calling typeclass resolution with flags: depth = ∞,unique = false,do_split = true,fail = false
20 Debug: 1: looking for (Foo true ?y) with backtracking
21 Debug: 1.1: simple apply foo on (Foo true ?y), 2 subgoal(s)
22 Debug: 1.1-1 : (Bar true ?y)
23 Debug: 1.1-1: looking for (Bar true ?y) with backtracking
24 Debug: 1.1-1.1: exact bar_2 on (Bar true ?y), 0 subgoal(s)
25 Debug: 1.1-2 : (Bax true)
26 Debug: 1.1-2: looking for (Bax true) without backtracking
27 Debug: 1.1-2: no match for (Bax true), 0 possibilities
28 Debug: 1.1-1.2: exact bar_1 on (Bar true ?y), 0 subgoal(s)
29 Debug: 1.1-2 : (Bax false)
30 Debug: 1.1-2: looking for (Bax false) without backtracking
31 Debug: 1.1-2.1: exact bax_1 on (Bax false), 0 subgoal(s)
32
33 produces bla =
34 foo true false bar_1 bax_1 : Foo true false
35 : Foo true false
36 *)