File tree Expand file tree Collapse file tree 2 files changed +4
-9
lines changed Expand file tree Collapse file tree 2 files changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ main (indt I) Prefix [CL] :- std.do! [
3636 add-reflect FI (global (const Correct)) (global (const Refl)) Breflect,
3737
3838 std.assert-ok! (coq.typecheck Breflect Treflect) "eqbOK generates illtyped term",
39- Namerf is Prefix ^ "eqb_OK",
39+ coq.ensure-fresh-global-id ( Prefix ^ "eqb_OK") Namerf ,
4040 coq.env.add-const Namerf Breflect Treflect @opaque! Reflect,
4141
4242 CL = eqbok-for (indt I) Reflect,
@@ -50,7 +50,7 @@ main (const C) Prefix [CL] :- std.do! [
5050 add-reflect (inductive _ _) (global (const Correct)) (global (const Refl)) Breflect,
5151
5252 std.assert-ok! (coq.typecheck Breflect _) "eqbOK generates illtyped term",
53- Namerf is Prefix ^ "eqb_OK",
53+ coq.ensure-fresh-global-id ( Prefix ^ "eqb_OK") Namerf ,
5454 X = global (const C),
5555 coq.env.add-const Namerf Breflect {{ forall a b : lp:X, Bool.reflect (@eq lp:X a b) (lp:F a b) }} @opaque! Reflect,
5656 CL = eqbok-for (const C) Reflect,
Original file line number Diff line number Diff line change @@ -26,20 +26,15 @@ Elpi Accumulate Db derive.eqbOK.db.
2626Elpi Accumulate File eqbOK.
2727Elpi Accumulate File eqType.
2828Elpi Accumulate lp:{{
29- main [str I, str O] :- !,
30- coq.locate I GR,
31- Prefix is O ^ "_",
32- derive.eqbOK.main GR Prefix _.
33-
3429 main [str I] :- !,
3530 coq.locate I GR,
3631 coq.gref->id GR Tname,
3732 Prefix is Tname ^ "_",
3833 derive.eqbOK.main GR Prefix _.
3934
4035 main _ :- usage.
41-
42- usage :- coq.error "Usage: derive.eqbOK <inductive name/alias> [<prefix>] ".
36+
37+ usage :- coq.error "Usage: derive.eqbOK <inductive name/alias>".
4338
4439}}.
4540Elpi Typecheck.
You can’t perform that action at this time.
0 commit comments