@@ -111,23 +111,24 @@ namespace tc {
111111 get-mode ClassGR M :- tc.class ClassGR _ _ M, !.
112112 get-mode ClassGR _ :- coq.error "[TC]" ClassGR "is an unknown class".
113113
114- pred make-tc.aux i:bool, i:prop, i:list prop, o:prop.
115- make-tc.aux _ Head [] Head.
116- make-tc.aux tt Head Body (Head :- Body).
117- make-tc.aux ff Head Body (Body => Head).
114+ pred make-tc.aux i:bool, i:term, i:prop, i:list prop, o:prop.
115+ make-tc.aux tt _ Head [] Head :- !.
116+ make-tc.aux ff Sol Head [] P :- !, P = if (var Sol) Head true.
117+ make-tc.aux tt _ Head Body (Head :- Body) :- !.
118+ make-tc.aux ff Sol Head Body P :- !, P = if (var Sol) (Body => Head) true.
118119
119120 pred make-tc i:term, i:term, i:list prop, i:bool, o:prop.
120- make-tc Ty Inst Body IsPositive Clause :-
121- coq.safe-dest-app Ty HD TL ,
122- get-TC-of-inst-type HD ClassGR,
121+ make-tc Goal Sol RuleBody IsPositive Rule :-
122+ coq.safe-dest-app Goal Class Args ,
123+ get-TC-of-inst-type Class ClassGR,
123124 gref->pred-name ClassGR ClassStr,
124- std.append TL [Inst] Args ,
125- coq.elpi.predicate ClassStr Args Head ,
126- make-tc.aux IsPositive Head Body Clause .
125+ std.append Args [Sol] ArgsSol ,
126+ coq.elpi.predicate ClassStr ArgsSol RuleHead ,
127+ make-tc.aux IsPositive Sol RuleHead RuleBody Rule .
127128
128- pred unwrap-prio i:tc-priority, o:int.
129- unwrap-prio (tc-priority-given Prio) Prio.
130- unwrap-prio (tc-priority-computed Prio) Prio.
129+ pred unwrap-prio i:tc-priority, o:int.
130+ unwrap-prio (tc-priority-given Prio) Prio.
131+ unwrap-prio (tc-priority-computed Prio) Prio.
131132
132133 % returns the priority of an instance from the gref of an instance
133134 pred get-inst-prio i:gref, o:int.
0 commit comments