| 1 |
Module RecordNothing. |
| 2 |
Class B. |
| 3 |
Record A := { ab : B }. |
| 4 |
Parameter a : A. |
| 5 |
Fail Check a : B. (* no coercion *) |
| 6 |
Existing Class A. |
| 7 |
Existing Instance a. |
| 8 |
Fail Type _ : B. (* no typeclass instance *) |
| 9 |
End RecordNothing. |
| 10 |
|
| 11 |
Module RecordCoercion. |
| 12 |
Class B. |
| 13 |
Record A := { ab :> B }. |
| 14 |
Parameter a : A. |
| 15 |
Check a : B. (* coercion *) |
| 16 |
Existing Class A. |
| 17 |
Existing Instance a. |
| 18 |
Fail Type _ : B. (* no typeclass instance *) |
| 19 |
End RecordCoercion. |
| 20 |
|
| 21 |
Module RecordTC. |
| 22 |
Class B. |
| 23 |
Record A := { ab :: B }. |
| 24 |
Parameter a : A. |
| 25 |
Fail Check a : B. (* no coercion *) |
| 26 |
Existing Class A. |
| 27 |
Existing Instance a. |
| 28 |
Type _ : B. (* typeclass instance *) |
| 29 |
End RecordTC. |
| 30 |
|
| 31 |
Module RecordCoercionTC. |
| 32 |
Class B. |
| 33 |
Record A := { ab ::> B }. |
| 34 |
Parameter a : A. |
| 35 |
Check a : B. (* coercion *) |
| 36 |
Existing Class A. |
| 37 |
Existing Instance a. |
| 38 |
Type _ : B. (* typeclass instance *) |
| 39 |
End RecordCoercionTC. |
| 40 |
|
| 41 |
Module ClassNothing. |
| 42 |
Class B. |
| 43 |
Class A := { ab : B }. |
| 44 |
Parameter a : A. |
| 45 |
Fail Check a : B. (* no coercion *) |
| 46 |
Existing Instance a. |
| 47 |
Fail Type _ : B. (* no typeclass instance *) |
| 48 |
End ClassNothing. |
| 49 |
|
| 50 |
Module ClassCoercion. |
| 51 |
Class B. |
| 52 |
Class A := { ab :> B }. |
| 53 |
Parameter a : A. |
| 54 |
Check a : B. (* coercion *) |
| 55 |
Existing Instance a. |
| 56 |
Fail Type _ : B. (* no typeclass instance *) |
| 57 |
End ClassCoercion. |
| 58 |
|
| 59 |
Module ClassTC. |
| 60 |
Class B. |
| 61 |
Class A := { ab :: B }. |
| 62 |
Parameter a : A. |
| 63 |
Fail Check a : B. (* no coercion *) |
| 64 |
Existing Instance a. |
| 65 |
Type _ : B. (* typeclass instance *) |
| 66 |
End ClassTC. |
| 67 |
|
| 68 |
Module ClassCoercionTC. |
| 69 |
Class B. |
| 70 |
Class A := { ab ::> B }. |
| 71 |
Parameter a : A. |
| 72 |
Check a : B. (* coercion *) |
| 73 |
Existing Instance a. |
| 74 |
Type _ : B. (* typeclass instance *) |
| 75 |
End ClassCoercionTC. |