Skip to content

Commit

Permalink
📝 Clear todos from doc
Browse files Browse the repository at this point in the history
  • Loading branch information
ecranceMERCE committed Jan 15, 2024
1 parent 186120a commit 24a8785
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 11 deletions.
6 changes: 1 addition & 5 deletions elpi/annot.elpi
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ sub-type (app [F|Xs]) (app [F'|Xs']) :-
% SubConv
sub-type X X :- (name X ; X = global _ ; X = pglobal _ _), !.
sub-type X Y :- coq.unify-eq X Y _.
% TODO: perform controlled reduction
% and extend implementation to fix, match, etc.
sub-type X Y :- coq.error "annot.sub-type:" X "vs" Y.

% syntactic term equality, taking care of adding annotation equalities in the constraint graph
Expand All @@ -100,7 +98,6 @@ eq _ _ :- fail.
% of the output type of T, as an option basically returning some (A,B) for an output type PType A B,
% and none for output types that are not sorts, because it means values of type T are not type
% constructors, so their translation will be made at class (0,0)
% TODO: duplicate code with type->class in param-class.elpi?
pred classes i:term, o:list param-class, o:option param-class.
classes T Cs' Out :-
all-classes T Cs,
Expand All @@ -121,7 +118,7 @@ all-classes (app L) Cs :- !,
all-classes X [] :- (name X ; X = global _ ; X = pglobal _ _), !.
all-classes X _ :- coq.error "all-classes:" X.

% TODO: discuss limitations
% output class of a term
pred out-class i:term, o:option param-class.
out-class (app [pglobal (const PType) _, M, N]) (some C) :- trocq.db.ptype PType, !,
cstr.univ-link C M N.
Expand All @@ -132,6 +129,5 @@ out-class (app [F|Xs]) Out :- !,
if (App = app [F|Xs]) (Out = none) (out-class App Out).
out-class X none :- (name X ; X = global _ ; X = pglobal _ _), !.
out-class X _ :- coq.error "out-class:" X.
% constant applications convertible to terms having a sort as output are not supported

} % annot
3 changes: 1 addition & 2 deletions elpi/constraints/constraint-graph.elpi
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,7 @@ pred add-dep-gref
add-dep-gref ID GR T Tm' GRR IDs (constraint-graph G) (constraint-graph G') :-
% the classes C_i (IDs) are not really "higher" than the output class C (ID)
% here, higher is a way to say that they must be instantiated later than the output class
% TODO: rename utility functions to add-earlier-node / add-later-node?
util.map.update ID (internal.add-higher-node (node.var (ct.gref GR T Tm' GRR) IDs)) G G1,
util.map.update ID (internal.add-higher-node (node.var (ct.gref GR T GR' GRR) IDs)) G G1,
std.fold IDs G1 (id\ g\ g'\
util.map.update id (internal.add-lower-node (node.var (ct.gref _ _ _ _) [ID])) g g')
G'.
Expand Down
1 change: 0 additions & 1 deletion elpi/param.elpi
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,6 @@ type wsuspend (term -> term) -> (term -> term) -> weakening.

% generate the weakening function from a type to a sub-type
% cf definition of weakening in the paper
% TODO: document suspend
pred weakening i:term, i:term, o:weakening.
weakening (app [pglobal (const PType) _, M, N]) (app [pglobal (const PType) _, M', N']) W :-
trocq.db.ptype PType, !,
Expand Down
1 change: 0 additions & 1 deletion elpi/util.elpi
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
% utility predicates
% -----------------------------------------------------------------------------

% TODO: document
pred do-not-fail.
:before "term->gref:fail"
coq.term->gref _ _ :- do-not-fail, !, false.
Expand Down
2 changes: 0 additions & 2 deletions theories/Param.v
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ From Trocq.Elpi.constraints Extra Dependency "constraints.elpi" as constraints.
Set Universe Polymorphism.
Unset Universe Minimization ToSet.

(* TODO: dead code? *)
Elpi Command genpparam.
Elpi Accumulate File util.
Elpi Accumulate Db trocq.db.
Expand Down Expand Up @@ -152,7 +151,6 @@ Elpi Accumulate lp:{{
FinalProof = {{ @comap lp:G lp:G' lp:GR (_ : lp:G') }},
util.when-debug dbg.full (coq.say FinalProof),

% TODO: explain why we need elaboration + typechecking + unification
std.assert-ok! (coq.elaborate-skeleton FinalProof G EFinalProof) "proof elaboration error",
std.assert-ok! (coq.typecheck EFinalProof G2) "proof typechecking error",
std.assert-ok! (coq.unify-leq G2 G) "goal unification error",
Expand Down

0 comments on commit 24a8785

Please sign in to comment.