Skip to content

Commit

Permalink
Merge pull request #1009 from SkySkimmer/ci-relevance
Browse files Browse the repository at this point in the history
Adapt to coq/coq#18280 (case relevance outside case info)
  • Loading branch information
ppedrot authored Nov 13, 2023
2 parents 4b0d5da + 0571a04 commit 285a97a
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ mrproper:
$(MAKE) -C template-pcuic .merlin
$(MAKE) -C quotation .merlin
$(MAKE) -C erasure .merlin
$(MAKE) -C erasure-plugin .merin
$(MAKE) -C erasure-plugin .merlin

utils:
$(MAKE) -C utils
Expand Down
2 changes: 1 addition & 1 deletion common/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ mrproper:
Makefile.coq: _CoqProject
coq_makefile -f _CoqProject -o Makefile.coq

.merlin:
.merlin: Makefile.coq
$(MAKE) -f $< $@
2 changes: 1 addition & 1 deletion erasure-plugin/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ mrproper:
rm -f Makefile.erasureplugin _CoqProject

.merlin: Makefile.plugin
[ -e "src/pCUICerasureplugin.ml" ] && make -f $< $@
make -f $< $@

cleanplugin: Makefile.plugin
make -f Makefile.plugin clean
Expand Down
2 changes: 1 addition & 1 deletion erasure/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ clean: Makefile.erasure
mrproper:
rm -f Makefile.erasure

.merlin:
.merlin: Makefile.erasure
make -f $< $@

vos: Makefile.erasure
Expand Down
2 changes: 1 addition & 1 deletion pcuic/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ mrproper:
vos: Makefile.coq
$(MAKE) -f Makefile.coq vos

.merlin:
.merlin: Makefile.coq
$(MAKE) -f $< $@

quick: Makefile.coq
Expand Down
2 changes: 1 addition & 1 deletion quotation/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ mrproper:
rm -f metacoq-config
rm -f Makefile.quotation _CoqProject

.merlin:
.merlin: Makefile.quotation
make -f $< $@

vos: Makefile.quotation
Expand Down
2 changes: 1 addition & 1 deletion safechecker/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ mrproper:
rm -f metacoq-config
rm -f Makefile.safechecker _CoqProject

.merlin:
.merlin: Makefile.safechecker
make -f $< $@

vos: Makefile.safechecker
Expand Down
4 changes: 2 additions & 2 deletions template-coq/src/denoter.ml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ struct
| ACoq_tCase (ci, p, c, brs) ->
let ind = D.unquote_inductive ci.aci_ind in
let relevance = D.unquote_relevance ci.aci_relevance in
let ci = Inductiveops.make_case_info (Global.env ()) ind relevance Constr.RegularStyle in
let ci = Inductiveops.make_case_info (Global.env ()) ind Constr.RegularStyle in
let evm, puinst = D.unquote_universe_instance evm p.auinst in
let evm, pars = map_evm (aux env) evm p.apars in
let pars = Array.of_list pars in
Expand All @@ -126,7 +126,7 @@ struct
in
let evm, brs = array_map_evm denote_br evm brs in
(* todo: reify better case_info *)
let pcase = (ci, puinst, pars, (napctx, pret), Constr.NoInvert, c, brs) in
let pcase = (ci, puinst, pars, ((napctx, pret), relevance), Constr.NoInvert, c, brs) in
evm, Constr.mkCase pcase
| ACoq_tFix (lbd, i) ->
let (names,types,bodies,rargs) = (List.map (fun p->p.adname) lbd, List.map (fun p->p.adtype) lbd, List.map (fun p->p.adbody) lbd,
Expand Down
4 changes: 2 additions & 2 deletions template-coq/src/quoter.ml
Original file line number Diff line number Diff line change
Expand Up @@ -314,11 +314,11 @@ struct
let mib = Environ.lookup_mind (fst mind) (snd env) in
add_inductive mind mib acc)

| Constr.Case (ci,u,pars, (predctx, pred), iv, discr, brs) ->
| Constr.Case (ci,u,pars, ((predctx, pred), relevance), iv, discr, brs) ->
let ind = Q.quote_inductive (Q.quote_kn (Names.MutInd.canonical (fst ci.Constr.ci_ind)),
Q.quote_int (snd ci.Constr.ci_ind)) in
let npar = Q.quote_int ci.Constr.ci_npar in
let q_relevance = Q.quote_relevance ci.Constr.ci_relevance in
let q_relevance = Q.quote_relevance relevance in
let acc, q_pars = CArray.fold_left_map (fun acc par -> let (qt, acc) = quote_term acc env sigma par in acc, qt) acc pars in
let qu = Q.quote_univ_instance u in
let pctx = CaseCompat.case_predicate_context (snd env) ci u pars predctx in
Expand Down
2 changes: 1 addition & 1 deletion template-pcuic/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ mrproper:
rm -f metacoq-config
rm -f Makefile.templatepcuic _CoqProject

.merlin:
.merlin: Makefile.templatepcuic
make -f $< $@

vos: Makefile.templatepcuic
Expand Down
2 changes: 1 addition & 1 deletion utils/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ mrproper:
Makefile.coq: _CoqProject
coq_makefile -f _CoqProject -o Makefile.coq

.merlin:
.merlin: Makefile.coq
$(MAKE) -f $< $@

0 comments on commit 285a97a

Please sign in to comment.