| 1 |
Module NoConv. |
| 2 |
Class C := {}. |
| 3 |
|
| 4 |
Definition useC {c:C} := nat. |
| 5 |
|
| 6 |
Inductive foo {a b : C} := CC : useC -> foo. |
| 7 |
(* If TC search runs before parameter unification it will pick the |
| 8 |
wrong instance for the first parameter. |
| 9 |
|
| 10 |
useC makes sure we don't completely skip TC search. |
| 11 |
*) |
| 12 |
End NoConv. |
| 13 |
|
| 14 |
Module ForConv. |
| 15 |
|
| 16 |
Class Bla := { bla : Type }. |
| 17 |
|
| 18 |
#[export] Instance bli : Bla := { bla := nat }. |
| 19 |
|
| 20 |
Inductive vs := C : forall x : bla, x = 2 -> vs. |
| 21 |
(* here we need to resolve TC to pass the conversion problem if we |
| 22 |
combined with the previous example it would fail as TC resolution |
| 23 |
for conversion is unrestricted and so would resolve the |
| 24 |
conclusion too early. *) |
| 25 |
|
| 26 |
End ForConv. |