Skip to content

Commit 3eceb49

Browse files
committed
Revert "[TC] compilation of primitive projections to their compatibility constants"
This reverts commit 6c63978.
1 parent 6c63978 commit 3eceb49

File tree

2 files changed

+3
-23
lines changed

2 files changed

+3
-23
lines changed

apps/tc/elpi/ho_compile.elpi

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ namespace tc {
2121
decompile-term-aux (pglobal _ _ as T) L T' L :- !, copy T T', !.
2222
decompile-term-aux (sort _ as T) L T' L :- !, copy T T', !.
2323
decompile-term-aux (uvar as X) L X L :- !.
24-
decompile-term-aux (primitive (proj P _)) L (global (const Y)) L :- !, coq.env.primitive-projection? P Y.
24+
decompile-term-aux (primitive _ as X) L X L :- !.
2525
decompile-term-aux (tc.canonical-projection T S _) (pr [X|Xs] L1) Y (pr Xs' L3) :- !,
2626
name Y X S,
2727
decompile-term-aux T (pr Xs L1) T' (pr Xs' L2),
@@ -332,8 +332,7 @@ namespace tc {
332332
get-uva-pair-arity Y L Z.
333333

334334
pred decompile-problematic-term i:term, i:list prop, o:term, o:list prop.
335-
decompile-problematic-term (primitive (proj P _)) A (global (const Y)) A :- !,
336-
coq.env.primitive-projection? P Y.
335+
decompile-problematic-term (primitive _ as C) A C A :- !.
337336

338337
decompile-problematic-term (tc.maybe-eta-tm T S) L V [tc.link.eta V T' | L2] :-
339338
prune V S, !, fold-map T L T' L2.

apps/tc/tests/canonical_struct.v

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -99,23 +99,4 @@ Module CS5.
9999
Unshelve.
100100
apply (ofe_any nat).
101101
Qed.
102-
End CS5.
103-
104-
Module CS6.
105-
#[projections(primitive=yes)]
106-
Structure ofe := Ofe { ofe_car : Type; }.
107-
108-
#[projections(primitive=no)] (* TODO: Putting primitive to yes leads to a unification error. Why? *)
109-
Structure cmra := { cmra_car :> Type; }.
110-
Canonical Structure cmra_ofeO (A : cmra) : ofe := Ofe A.
111-
112-
Class C (I : Type).
113-
Instance c : forall (A : ofe), C ((A).(ofe_car)) := {}.
114-
115-
Section s.
116-
Context {cmra : cmra}.
117-
Goal C (cmra_car cmra).
118-
apply _.
119-
Qed.
120-
End s.
121-
End CS6.
102+
End CS5.

0 commit comments

Comments
 (0)