| 1 |
From elpi.apps.tc.tests.premisesSort Require Import sortCode. |
| 2 |
Elpi Debug "simple-compiler". |
| 3 |
Set TC AddModes. |
| 4 |
|
| 5 |
Class A (S : Type). |
| 6 |
Class B (S : Type). |
| 7 |
Class C (S : Type). |
| 8 |
|
| 9 |
Global Hint Mode A + : typeclass_instances. |
| 10 |
|
| 11 |
Global Instance A1 : A nat. Admitted. |
| 12 |
|
| 13 |
Global Instance B1 : B nat. Admitted. |
| 14 |
|
| 15 |
(* |
| 16 |
Here since the output of T is input in A, we want to reorder |
| 17 |
the goals such that the proof of be is computed first. |
| 18 |
Question do we want to raise an error or try to rearrange |
| 19 |
subgoals in C1. We can try to make an analysis in the compiling |
| 20 |
phase to raise the error. |
| 21 |
*) |
| 22 |
Global Instance C1 {T : Type} `{e : A T, B T} : C bool. Admitted. |
| 23 |
|
| 24 |
Elpi AddAllClasses. |
| 25 |
Elpi AddAllInstances. |
| 26 |
|
| 27 |
Elpi TC Solver Override TC.Solver All. |
| 28 |
|
| 29 |
Elpi Print TC.Solver "elpi.apps.tc.tests/TC.Solver". |
| 30 |
Goal C bool. |
| 31 |
apply _. |
| 32 |
Qed. |