Skip to content

Commit 0807188

Browse files
committed
Change signature of is-option-active
1 parent 873e45e commit 0807188

File tree

5 files changed

+11
-12
lines changed

5 files changed

+11
-12
lines changed

apps/tc/elpi/compiler.elpi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ compile-aux (prod N T F) I RevPremises ListVar [] IsPositive IsHead Clause ff :-
9797
(L = [NewPremise | RevPremises])) (L = RevPremises),
9898
compile-aux (F p) I L [p | ListVar] [] IsPositive IsHead (C p) _.
9999
compile-aux Ty I RevPremises ListVar [] _ IsHead Clause tt :-
100-
not (is-option-active {oTC-use-pattern-fragment-compiler}), !,
100+
not (is-option-active oTC-use-pattern-fragment-compiler), !,
101101
std.rev RevPremises Premises,
102102
coq.mk-app I {std.rev ListVar} AppInst,
103103
make-tc IsHead Ty AppInst Premises Clause.

apps/tc/elpi/solver.elpi

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
pred time-solve i:prop.
55
time-solve P :-
66
std.time P Time,
7-
if (is-option-active {oTC-time}) (coq.say "[TC] Total resolution time is:" Time) true.
7+
if (is-option-active oTC-time) (coq.say "[TC] Total resolution time is:" Time) true.
88

99
msolve L N :- !,
1010
time-solve (coq.ltac.all (coq.ltac.open solve-aux) {std.rev L} N).
@@ -28,7 +28,7 @@ tc-recursive-search Ty Sol :-
2828
std.time (coq.safe-dest-app Ty (global TC) TL',
2929
std.append TL' [Sol] TL,
3030
coq.elpi.predicate {gref->pred-name TC} TL Q, Q) Time,
31-
if (is-option-active {oTC-time-instance-search}) (coq.say "[TC] Instance search time is:" Time) true.
31+
if (is-option-active oTC-time-instance-search) (coq.say "[TC] Instance search time is:" Time) true.
3232

3333
:if "solve-print-goal"
3434
solve (goal Ctx _ Ty _ _) _ :-
@@ -80,10 +80,10 @@ solve-aux (goal Ctx _ Ty Sol _ as G) GL :-
8080
% coq.say "Solution " X "end" X' "caio",
8181
% std.assert! (ground_term X') "solution not complete",
8282
% (pi F\ (copy (fun _ _ x\ (app [F, x])) F :- !)) => copy X X',
83-
if (is-option-active {oTC-ignore-eta-reduction})
83+
if (is-option-active oTC-ignore-eta-reduction)
8484
(Proof' = Proof) (coq.reduction.eta-contract Proof Proof'),
8585
std.time (refine Proof' G GL) Refine-Time,
86-
if (is-option-active {oTC-time-refine}) (coq.say "[TC] Refine time is:" Refine-Time) true;
86+
if (is-option-active oTC-time-refine) (coq.say "[TC] Refine time is:" Refine-Time) true;
8787
coq.error "illtyped solution:" {coq.term->string Proof}
8888
)
8989
(GL = [seal G]).

apps/tc/elpi/tc_aux.elpi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ get-last (app L) R :-
6969
% TC preds are on the form tc-[PATH_TO_TC].tc-[TC-Name]
7070
pred gref->pred-name i:gref, o:string.
7171
gref->pred-name Gr S :-
72-
if (is-option-active {oTC-clauseNameShortName})
72+
if (is-option-active oTC-clauseNameShortName)
7373
(Path = "")
7474
(coq.gref->path Gr [Hd | Tl],
7575
std.fold Tl Hd (x\acc\r\ r is acc ^ "." ^ x) Path',

apps/tc/theories/db.v

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ Elpi Db tc_options.db lp:{{
3939
oTC-use-pattern-fragment-compiler
4040
].
4141

42-
pred is-option-active i:list string.
43-
is-option-active Opt :-
44-
coq.option.get Opt (coq.option.bool tt).
42+
pred is-option-active i:(list string -> prop).
43+
is-option-active Opt :-
44+
Opt X, coq.option.get X (coq.option.bool tt).
4545
}}.
4646

4747
Elpi Db tc.db lp:{{

apps/tc/theories/tc.v

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,8 @@ Elpi Accumulate File create_tc_predicate.
4545
Elpi Accumulate File solver.
4646
Elpi Query lp:{{
4747
sigma Options\
48-
all-options Options,
49-
std.forall Options (x\ sigma Args\ x Args,
50-
coq.option.add Args (coq.option.bool ff) ff).
48+
std.forall {all-options} (x\ sigma L\ x L,
49+
coq.option.add L (coq.option.bool ff) ff).
5150
}}.
5251
Elpi Typecheck.
5352

0 commit comments

Comments
 (0)