Skip to content

Commit 7965a06

Browse files
committed
1 parent 7065b03 commit 7965a06

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/rocq_elpi_builtins.ml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1349,6 +1349,16 @@ let declare_projections ind ~kind _ id flags implicits _ =
13491349
Record.Internal.declare_projections ind ~kind ~inhabitant_id:id flags implicits
13501350
[%%endif]
13511351

1352+
[%%if coq = "8.20" || coq = "9.0"]
1353+
let apply_proof ~name ~poly env tac pf =
1354+
let (), pv, _, _ = Proofview.apply ~name ~poly env tac pf in
1355+
pv
1356+
[%%else]
1357+
let apply_proof ~name ~poly env tac pf =
1358+
let (), pv, _, _, _ = Proofview.apply ~name ~poly env tac pf in
1359+
pv
1360+
[%%endif]
1361+
13521362
let coq_misc_builtins =
13531363
let open API.BuiltIn in
13541364
let open Pred in
@@ -3816,10 +3826,10 @@ Supported attributes:
38163826
Unsafe.tclSETGOALS [with_empty_state goal] <*> tactic in
38173827
with_no_tc ~no_tc (fun sigma ->
38183828
let _, pv = init sigma [] in
3819-
let (), pv, _, _ =
3829+
let pv =
38203830
let vernac_state = Vernacstate.freeze_full_state () in
38213831
try
3822-
let rc = apply ~name:(Id.of_string "elpi") ~poly:false proof_context.env focused_tac pv in
3832+
let rc = apply_proof ~name:(Id.of_string "elpi") ~poly:false proof_context.env focused_tac pv in
38233833
let pstate = Vernacstate.Stm.pstate (Vernacstate.freeze_full_state ()) in
38243834
let vernac_state = Vernacstate.Stm.set_pstate vernac_state pstate in
38253835
Vernacstate.unfreeze_full_state vernac_state;

0 commit comments

Comments
 (0)