Skip to content

Commit c082aee

Browse files
authored
Merge pull request #688 from proux01/stdlib_repo
Adapt to rocq-prover/rocq#19530
2 parents a730e65 + ac0fcc8 commit c082aee

File tree

5 files changed

+29
-15
lines changed

5 files changed

+29
-15
lines changed

.nix/coq-overlays/coq-elpi/default.nix

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ let
1010
{ case = "8.16"; out = { version = "1.17.0"; };}
1111
{ case = "8.17"; out = { version = "1.17.0"; };}
1212
{ case = "8.18"; out = { version = "1.18.1"; };}
13-
{ case = "8.19"; out = { version = "1.18.1"; };}
1413
{ case = "8.20"; out = { version = "2.0.3"; };}
1514
] {} );
1615
in (mkCoqDerivation {
@@ -78,6 +77,10 @@ in (mkCoqDerivation {
7877
maintainers = [ lib.maintainers.cohencyril ];
7978
license = lib.licenses.lgpl21Plus;
8079
};
80+
81+
preBuild = ''
82+
make elpi/dune || true
83+
'';
8184
}).overrideAttrs (o:
8285
lib.optionalAttrs (o.version != null
8386
&& (o.version == "dev" || lib.versions.isGe "2.2.0" o.version))

Makefile

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,50 @@
11
dune = dune $(1) $(DUNE_$(1)_FLAGS)
22

3-
all:
3+
elpi/dune: elpi/dune.in
4+
@rm -f $@
5+
@echo "; generated by make, do not edit" > $@
6+
@if $$(coqc --version | grep -q "8.19\|8.20") ; then \
7+
sed -e 's/@@STDLIB_THEORY@@//' $< >> $@ ; \
8+
else \
9+
sed -e 's/@@STDLIB_THEORY@@/(theories Stdlib)/' $< >> $@ ; \
10+
fi
11+
@chmod a-w $@
12+
13+
all: elpi/dune
414
$(call dune,build)
515
$(call dune,build) builtin-doc
616
.PHONY: all
717

8-
build-core:
18+
build-core: elpi/dune
919
$(call dune,build) theories
1020
$(call dune,build) builtin-doc
1121
.PHONY: build-core
1222

13-
build-apps:
23+
build-apps: elpi/dune
1424
$(call dune,build) $$(find apps -type d -name theories)
1525
.PHONY: build-apps
1626

17-
build:
27+
build: elpi/dune
1828
$(call dune,build) -p coq-elpi @install
1929
$(call dune,build) builtin-doc
2030
.PHONY: build
2131

22-
test-core:
32+
test-core: elpi/dune
2333
$(call dune,runtest) tests
2434
$(call dune,build) tests
2535
.PHONY: test-core
2636

27-
test-apps:
37+
test-apps: elpi/dune
2838
$(call dune,build) $$(find apps -type d -name tests)
2939
.PHONY: test-apps
3040

31-
test:
41+
test: elpi/dune
3242
$(call dune,runtest)
3343
$(call dune,build) tests
3444
$(call dune,build) $$(find apps -type d -name tests)
3545
.PHONY: test
3646

37-
examples:
47+
examples: elpi/dune
3848
$(call dune,build) examples
3949
.PHONY: examples
4050

@@ -56,7 +66,7 @@ clean:
5666
$(call dune,clean)
5767
.PHONY: clean
5868

59-
install:
69+
install: elpi/dune
6070
$(call dune,install) coq-elpi
6171
.PHONY: install
6272

apps/tc/elpi/tc_aux.elpi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ namespace tc {
9393
if (tc.is-option-active tc.oTC-clauseNameShortName)
9494
(Path = "")
9595
(coq.gref->path Gr [Hd | Tl],
96-
if (Hd = "Coq") (Hd' = "Stdlib") (Hd' = Hd),
96+
if (Hd = "Coq") (Hd' = "Corelib") (Hd' = Hd),
9797
std.string.concat "." [Hd'|Tl] Path',
9898
Path is Path' ^ ".tc-"),
9999
% CAVEAT : Non-ascii caractars can't be part of a pred

apps/tc/tests/bigTest.v

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -882,7 +882,7 @@ instances *)
882882
Section prod_setoid.
883883
Context `{Equiv A, Equiv B}.
884884
Elpi Accumulate TC.Solver lp:{{
885-
shorten tc-Stdlib.Classes.RelationClasses.{tc-Equivalence}.
885+
shorten tc-Corelib.Classes.RelationClasses.{tc-Equivalence}.
886886
:after "lastHook"
887887
tc-Equivalence A RA R :-
888888
RA = {{@equiv _ (@prod_equiv _ _ _ _)}},
@@ -910,7 +910,7 @@ Section prod_setoid.
910910
std.map L1 remove_equiv_prod_equiv L2.
911911
remove_equiv_prod_equiv A A.
912912

913-
shorten tc-Stdlib.Classes.Morphisms.{tc-Proper}.
913+
shorten tc-Corelib.Classes.Morphisms.{tc-Proper}.
914914

915915
:after "lastHook"
916916
tc-Proper A B C R :-
@@ -1043,7 +1043,7 @@ Elpi Accumulate TC.Solver lp:{{
10431043
std.map L1 remove_equiv_sum_equiv L2.
10441044
remove_equiv_sum_equiv A A.
10451045

1046-
shorten tc-Stdlib.Classes.Morphisms.{tc-Proper}.
1046+
shorten tc-Corelib.Classes.Morphisms.{tc-Proper}.
10471047
:after "lastHook"
10481048
tc-Proper A B C R :-
10491049
B = {{ @respectful _ _ _ _ }},

elpi/dune renamed to elpi/dune.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
(coq.theory
22
(name elpi_elpi) ; FIXME
3-
(package coq-elpi))
3+
(package coq-elpi)
4+
@@STDLIB_THEORY@@)
45

56
(rule
67
(target dummy.v)

0 commit comments

Comments
 (0)