Skip to content

Commit 2873b99

Browse files
committed
adapt to rocq 9.1
1 parent b52e23d commit 2873b99

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

src/rocq_elpi_builtins.ml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1562,6 +1562,19 @@ let apply_proof ~name ~poly env tac pf =
15621562
[%%endif]
15631563

15641564

1565+
[%%if coq = "9.0"]
1566+
let section_close_section x =
1567+
let a,b,_,_ = Section.close_section x in
1568+
a, b
1569+
[%%elif coq = "9.1"]
1570+
let section_close_section x =
1571+
let a,b,_,_,_ = Section.close_section x in
1572+
a, b
1573+
[%%else]
1574+
let section_close_section x =
1575+
let a,b,_,_ = Section.close_section x in
1576+
a, b
1577+
[%%endif]
15651578

15661579

15671580

@@ -2154,12 +2167,12 @@ Supported attributes:
21542167
match section with
21552168
| None -> []
21562169
| Some s ->
2157-
let section,l,_,_ = Section.close_section s in
2170+
let section,l = section_close_section s in
21582171
List.concat_map (function
21592172
| Section.SecDefinition c -> [GlobRef.ConstRef c]
21602173
| Section.SecInductive m ->
2161-
let { Declarations.mind_ntypes } = Environ.lookup_mind m (Safe_typing.env_of_safe_env safe_env) in
2162-
List.init mind_ntypes (fun i -> GlobRef.IndRef(m,i))
2174+
let { Declarations.mind_packets } = Environ.lookup_mind m (Safe_typing.env_of_safe_env safe_env) in
2175+
List.init (Array.length mind_packets) (fun i -> GlobRef.IndRef(m,i))
21632176
) l :: aux section
21642177
in
21652178
aux section

0 commit comments

Comments
 (0)