Skip to content

Commit 72181bd

Browse files
ppedrotFissoreD
authored andcommitted
1 parent 56adb4f commit 72181bd

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
@@ -3850,10 +3860,10 @@ Supported attributes:
38503860
Unsafe.tclSETGOALS [with_empty_state goal] <*> tactic in
38513861
with_no_tc ~no_tc (fun sigma ->
38523862
let _, pv = init sigma [] in
3853-
let (), pv, _, _ =
3863+
let pv =
38543864
let vernac_state = Vernacstate.freeze_full_state () in
38553865
try
3856-
let rc = apply ~name:(Id.of_string "elpi") ~poly:false proof_context.env focused_tac pv in
3866+
let rc = apply_proof ~name:(Id.of_string "elpi") ~poly:false proof_context.env focused_tac pv in
38573867
let pstate = Vernacstate.Stm.pstate (Vernacstate.freeze_full_state ()) in
38583868
let vernac_state = Vernacstate.Stm.set_pstate vernac_state pstate in
38593869
Vernacstate.unfreeze_full_state vernac_state;

0 commit comments

Comments
 (0)