coq-elpi
coq-elpi copied to clipboard
Modes ignored on recursive typeclass search
The modes of a class are ignored during a typeclass search when the solver does a recursive call.
From elpi Require Import elpi tc.
#[mode(i)] TC.Declare Class C (n : nat) := {}.
#[mode(o)] TC.Declare Class D (n : nat) := {c : C n}.
Instance C0 : C 0 := Build_C 0.
Instance DC (n : nat) `{c : C n} : D n := Build_D n c.
Goal exists n, D n.
eexists.
Succeed elpi TC.Solver.