Skip to content

Commit

Permalink
Merge pull request #504 from proux01/revert-elpi_750
Browse files Browse the repository at this point in the history
Revert "Adapt to LPCIC/coq-elpi#750"
  • Loading branch information
proux01 authored Jan 23, 2025
2 parents 79ccf37 + 9ec87c4 commit 3641101
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions HB/common/utils.elpi
Original file line number Diff line number Diff line change
Expand Up @@ -324,14 +324,9 @@ pred prod-last-gref i:term, o:gref.
prod-last-gref (prod N S X) GR :- !, @pi-decl N S x\ prod-last-gref (X x) GR.
prod-last-gref X GR :- coq.term->gref X GR.

pred count-prods-nored i:term, o:int.
count-prods-nored (prod _ _ B) N :- !, (pi x\ count-prods-nored (B x) M), N is M + 1.
count-prods-nored (let _ _ _ B) N :- !, (pi x\ count-prods-nored (B x) N).
count-prods-nored _ 0.

% saturate a type constructor with holes
pred saturate-type-constructor i:term, o:term .
saturate-type-constructor T ET :-
coq.typecheck T TH ok,
count-prods-nored TH N,
coq.count-prods TH N,
coq.mk-app T {coq.mk-n-holes N} ET.

0 comments on commit 3641101

Please sign in to comment.