Skip to content

Commit 62a1b33

Browse files
committed
Remove unsafe_typ argument of Declare.prepare_proof
This only existed for vio which has been removed.
1 parent 85dce84 commit 62a1b33

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

vernac/declare.ml

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1747,8 +1747,7 @@ let warn_remaining_unresolved_evars =
17471747
(fun () -> Pp.str"The proof has unresolved variables")
17481748

17491749
(* XXX: This is still separate from close_proof below due to drop_pt in the STM *)
1750-
(* XXX: Unsafe_typ:true is needed by vio files, see bf0499bc507d5a39c3d5e3bf1f69191339270729 *)
1751-
let prepare_proof ?(warn_incomplete=true) ~unsafe_typ { proof } =
1750+
let prepare_proof ?(warn_incomplete=true) { proof } =
17521751
let Proof.{name=pid;entry;poly} = Proof.data proof in
17531752
let initial_goals = Proofview.initial_goals entry in
17541753
let evd = Proof.return ~pid proof in
@@ -1767,13 +1766,6 @@ let prepare_proof ?(warn_incomplete=true) ~unsafe_typ { proof } =
17671766
| None ->
17681767
CErrors.user_err Pp.(str "Some unresolved existential variables remain")
17691768
in
1770-
let to_constr_typ t =
1771-
if unsafe_typ
1772-
then
1773-
let t = EConstr.Unsafe.to_constr t in
1774-
Vars.universes_of_constr t, t
1775-
else to_constr_body t
1776-
in
17771769
(* ppedrot: FIXME, this is surely wrong. There is no reason to duplicate
17781770
side-effects... This may explain why one need to uniquize side-effects
17791771
thereafter... *)
@@ -1786,7 +1778,7 @@ let prepare_proof ?(warn_incomplete=true) ~unsafe_typ { proof } =
17861778
equations and so far there is no code in the CI that will
17871779
actually call those and do a side-effect, TTBOMK *)
17881780
(* EJGA: likely the right solution is to attach side effects to the first constant only? *)
1789-
let proofs = List.map (fun (_, body, typ) -> (to_constr_body body, eff), to_constr_typ typ) initial_goals in
1781+
let proofs = List.map (fun (_, body, typ) -> (to_constr_body body, eff), to_constr_body typ) initial_goals in
17901782
proofs, Evd.evar_universe_context evd
17911783

17921784
let make_univs_deferred ~poly ~initial_euctx ~uctx ~udecl
@@ -1840,8 +1832,7 @@ let close_proof ?warn_incomplete ~opaque ~keep_body_ucst_separate ps =
18401832
let { using; proof; initial_euctx; pinfo } = ps in
18411833
let { Proof_info.info = { Info.udecl } } = pinfo in
18421834
let { Proof.name; poly } = Proof.data proof in
1843-
let unsafe_typ = keep_body_ucst_separate && not poly in
1844-
let elist, uctx = prepare_proof ?warn_incomplete ~unsafe_typ ps in
1835+
let elist, uctx = prepare_proof ?warn_incomplete ps in
18451836
let opaque = match opaque with
18461837
| Vernacexpr.Opaque -> true
18471838
| Vernacexpr.Transparent -> false in
@@ -1917,7 +1908,7 @@ let return_partial_proof { proof } =
19171908
proofs, Evd.evar_universe_context evd
19181909

19191910
let return_proof ps =
1920-
let p, uctx = prepare_proof ~unsafe_typ:false ps in
1911+
let p, uctx = prepare_proof ps in
19211912
List.map (fun (((_ub, body),eff),_) -> (body,eff)) p, uctx
19221913

19231914
let update_sigma_univs ugraph p =

0 commit comments

Comments
 (0)