Skip to content

Commit a42b2e0

Browse files
authored
Merge pull request #304 from proux01/rm_coq_version_tests
Remove outdated Coq version tests now that we require 8.15
2 parents 2c48aeb + 9e360d6 commit a42b2e0

File tree

4 files changed

+4
-21
lines changed

4 files changed

+4
-21
lines changed

HB/common/stdpp.elpi

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,7 @@ constraint print-ctx mixin-src {
101101

102102
% approximation, it should be logical path, not the file name
103103
pred coq.env.current-library o:string.
104-
coq.env.current-library L :- coq.version _ _ N _, N >= 13, !,
105-
loc.fields {get-option "elpi.loc"} L _ _ _ _.
104+
coq.env.current-library L :- loc.fields {get-option "elpi.loc"} L _ _ _ _.
106105
coq.env.current-library "dummy.v".
107106

108107
pred coq.prod-tgt->gref i:term, o:gref.

HB/common/utils.elpi

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -120,29 +120,22 @@ nice-gref->string X Mod :-
120120
nice-gref->string X S :-
121121
coq.term->string (global X) S.
122122

123-
pred compat.concat i:string, i:list string, o:string.
124-
compat.concat S L O :- coq.version _ _ N _, N > 12, !, std.string.concat S L O.
125-
compat.concat S L O :- compat.concat.aux L S O.
126-
compat.concat.aux [] _ "".
127-
compat.concat.aux [X] _ X :- !.
128-
compat.concat.aux [X|XS] Sep O :- compat.concat.aux XS Sep O1, O is X ^ Sep ^ O1.
129-
130123
pred gref->modname i:gref, i:int, i:string, o:string.
131124
gref->modname GR NComp Sep ModName :-
132125
coq.gref->path GR Path,
133126
std.rev Path Mods,
134127
std.length Path Len,
135128
if (Len >= NComp) true (coq.error "Not enough enclosing modules for" {coq.gref->string GR}),
136129
std.take NComp Mods L,
137-
compat.concat Sep {std.rev L} ModName.
130+
std.string.concat Sep {std.rev L} ModName.
138131
pred gref->modname-label i:gref, i:int, i:string, o:string.
139132
gref->modname-label GR NComp Sep ModName :-
140133
coq.gref->path GR Path,
141134
std.rev Path PathRev,
142135
std.length PathRev Len,
143136
if (Len >= NComp) (N = NComp) (N = Len),
144137
std.take N PathRev L,
145-
compat.concat Sep {std.rev [{coq.gref->id GR}|L]} ModName.
138+
std.string.concat Sep {std.rev [{coq.gref->id GR}|L]} ModName.
146139

147140
pred avoid-name-collision i:string, o:string.
148141
avoid-name-collision S S1 :-

HB/graph.elpi

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,14 @@ to-file File :- !, std.do! [
1818

1919
namespace private {
2020

21-
pred compat.concat i:string, i:list string, o:string.
22-
compat.concat S L O :- coq.version _ _ N _, N > 12, !, std.string.concat S L O.
23-
compat.concat S L O :- compat.concat.aux L S O.
24-
compat.concat.aux [] _ "".
25-
compat.concat.aux [X] _ X :- !.
26-
compat.concat.aux [X|XS] Sep O :- compat.concat.aux XS Sep O1, O is X ^ Sep ^ O1.
27-
2821
pred gref->modname i:gref, i:int, i:string, o:string.
2922
gref->modname GR NComp Sep ModName :-
3023
coq.gref->path GR Path,
3124
std.rev Path Mods,
3225
std.length Path Len,
3326
if (Len >= NComp) true (coq.error "Not enough enclosing modules for" {coq.gref->string GR}),
3427
std.take NComp Mods L,
35-
compat.concat Sep {std.rev L} ModName.
28+
std.string.concat Sep {std.rev L} ModName.
3629

3730
pred pp-coercion-dot i:out_stream, i:coercion.
3831
pp-coercion-dot OC (coercion _ _ Src (grefclass Tgt)) :- class-def (class Src _ _), class-def (class Tgt _ _), !, std.do! [

structures.v

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,8 +252,6 @@ Elpi Accumulate Db hb.db.
252252
#[only="8.15.*"] Elpi Accumulate File "HB/common/compat_815.elpi".
253253
Elpi Accumulate lp:{{
254254

255-
main _ :- coq.version _ _ N _, N < 13, !,
256-
coq.say "HB: HB.locate requires Coq version 8.13 or above".
257255
main [str S] :- !,
258256
if (decl-location {coq.locate S} Loc)
259257
(coq.say "HB: synthesized in file" Loc)

0 commit comments

Comments
 (0)