Skip to content

Commit ae8804c

Browse files
committed
[TC] refactor filenames + reorder import
1 parent f53d5f1 commit ae8804c

File tree

14 files changed

+243
-487
lines changed

14 files changed

+243
-487
lines changed

apps/tc/elpi/WIP/force_llam.elpi

Lines changed: 0 additions & 131 deletions
This file was deleted.

apps/tc/elpi/WIP/modes.elpi

Lines changed: 0 additions & 44 deletions
This file was deleted.

apps/tc/elpi/base.elpi

Lines changed: 4 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -145,32 +145,10 @@ pred count-prod i:term , o:nat.
145145
count-prod (prod _ _ B) (s N) :- !, pi x\ count-prod (B x) N.
146146
count-prod _ z.
147147

148-
pred close-prop i:(A -> list prop), o:list prop.
149-
close-prop (x\ []) [] :- !.
150-
close-prop (x\ [X | Xs x]) [X| Xs'] :- !, close-prop Xs Xs'.
151-
close-prop (x\ [X x | Xs x]) [pi x\ X x | Xs'] :- !, close-prop Xs Xs'.
152-
153-
pred close-prop-no-prune i:(A -> list prop), o:list prop.
154-
close-prop-no-prune (x\ []) [] :- !.
155-
close-prop-no-prune (x\ [X x | Xs x]) [pi x\ X x | Xs'] :- !,
156-
close-prop-no-prune Xs Xs'.
157-
158-
% [close-term-ty (x\ L) Ty R] Ty is the type of x
159-
pred close-term-ty i:(term -> list prop), i:term, o:list prop.
160-
close-term-ty (x\ []) _ [] :- !.
161-
close-term-ty (x\ [X | Xs x]) Ty [X| Xs'] :- !, close-term-ty Xs Ty Xs'.
162-
close-term-ty (x\ [X x | Xs x]) Ty [@pi-decl `x` Ty x\ X x | Xs'] :- !,
163-
close-term-ty Xs Ty Xs'.
164-
165-
pred close-term-no-prune-ty i:(term -> list prop), i:term, o:list prop.
166-
close-term-no-prune-ty (x\ []) _ [] :- !.
167-
close-term-no-prune-ty (x\ [X x | Xs x]) Ty [@pi-decl `x` Ty x\ X x | Xs'] :- !,
168-
close-term-no-prune-ty Xs Ty Xs'.
169-
170-
pred close-term-no-prune-fun i:(term -> list term), i:term, o:list term.
171-
close-term-no-prune-fun (x\ []) _ [] :- !.
172-
close-term-no-prune-fun (x\ [X x | Xs x]) Ty [fun _ Ty X | Xs'] :-
173-
close-term-no-prune-fun Xs Ty Xs'.
148+
pred close-prop-no-prune-pi-decl i:(term -> list prop), i:term, o:list prop.
149+
close-prop-no-prune-pi-decl (x\ []) _ [] :- !.
150+
close-prop-no-prune-pi-decl (x\ [X x | Xs x]) Ty [@pi-decl `x` Ty x\ X x | Xs'] :- !,
151+
close-prop-no-prune-pi-decl Xs Ty Xs'.
174152

175153
pred free-names i:term, o:list term.
176154
free-names T L :-

apps/tc/elpi/compile_goal.elpi

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
namespace tc {
22
namespace compile {
3-
namespace goall {
3+
namespace goal {
44
:index (_ _ 1)
55
pred may-contract-to i:list term, i:term, i:term.
66
may-contract-to _ N N :- !.
@@ -56,7 +56,7 @@ namespace tc {
5656
(pi x\ compile-full-aux (Bo x) [] (Bo' x) (BoL x)),
5757
% TODO: maybe attach to the links the list of used binders, to simply make this check?
5858
% Maybe L' is a pair list links and list binders per link, this way we can easily prune
59-
close-term-no-prune-ty BoL Ty BoL',
59+
close-prop-no-prune-pi-decl BoL Ty BoL',
6060
std.append L BoL' L'.
6161

6262
pred compile-full-aux i:term, i:list prop, o:term, o:list prop.
@@ -147,9 +147,9 @@ namespace tc {
147147
compile-full Goal Goal' Links :- compile-full-aux Goal [] Goal' Links.
148148
}
149149

150-
pred goal' i:term, o:term, o:list prop.
151-
:name "compile-goal'"
152-
goal' Goal Goal' Links :-
153-
goall.compile-full-aux Goal [] Goal' Links.
150+
pred goal i:term, o:term, o:list prop.
151+
:name "compile-goal"
152+
goal Goal Goal' Links :-
153+
goal.compile-full-aux Goal [] Goal' Links.
154154
}
155155
}

0 commit comments

Comments
 (0)