Skip to content

Commit 78c7545

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

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
@@ -23,7 +23,7 @@ namespace tc {
2323
decompile-term-aux (pglobal _ _ as T) L T' L :- !, copy T T', !.
2424
decompile-term-aux (sort _ as T) L T' L :- !, copy T T', !.
2525
decompile-term-aux (uvar as X) L X L :- !.
26-
decompile-term-aux (primitive (proj P _)) L (global (const Y)) L :- !, coq.env.primitive-projection? P Y.
26+
decompile-term-aux (primitive _ as X) L X L :- !.
2727
decompile-term-aux (tc.canonical-projection T S _) (pr [X|Xs] L1) Y (pr Xs' L3) :- !,
2828
name Y X S,
2929
decompile-term-aux T (pr Xs L1) T' (pr Xs' L2),
@@ -334,8 +334,7 @@ namespace tc {
334334
get-uva-pair-arity Y L Z.
335335

336336
pred decompile-problematic-term i:term, i:list prop, o:term, o:list prop.
337-
decompile-problematic-term (primitive (proj P _)) A (global (const Y)) A :- !,
338-
coq.env.primitive-projection? P Y.
337+
decompile-problematic-term (primitive _ as C) A C A :- !.
339338

340339
decompile-problematic-term (tc.maybe-eta-tm T S) L V [tc.link.eta V T' | L2] :-
341340
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)