aboutsummaryrefslogtreecommitdiff
path: root/vernac/declareObl.ml
diff options
context:
space:
mode:
Diffstat (limited to 'vernac/declareObl.ml')
-rw-r--r--vernac/declareObl.ml21
1 files changed, 5 insertions, 16 deletions
diff --git a/vernac/declareObl.ml b/vernac/declareObl.ml
index e7773abaf4..8fd6bc7eab 100644
--- a/vernac/declareObl.ml
+++ b/vernac/declareObl.ml
@@ -149,18 +149,8 @@ let declare_obligation prg obl body ty uctx =
if get_shrink_obligations () && not poly then shrink_body body ty
else ([], body, ty, [||])
in
- let body =
- ((body, Univ.ContextSet.empty), Evd.empty_side_effects)
- in
- let ce =
- Proof_global.{ proof_entry_body = Future.from_val ~fix_exn:(fun x -> x) body
- ; proof_entry_secctx = None
- ; proof_entry_type = ty
- ; proof_entry_universes = uctx
- ; proof_entry_opaque = opaque
- ; proof_entry_inline_code = false
- ; proof_entry_feedback = None }
- in
+ let ce = Declare.definition_entry ?types:ty ~opaque ~univs:uctx body in
+
(* ppedrot: seems legit to have obligations as local *)
let constant =
Declare.declare_constant ~name:obl.obl_name
@@ -495,12 +485,11 @@ type obligation_qed_info =
}
let obligation_terminator entries uctx { name; num; auto } =
- let open Proof_global in
match entries with
| [entry] ->
let env = Global.env () in
- let ty = entry.proof_entry_type in
- let body, eff = Future.force entry.proof_entry_body in
+ let ty = entry.Declare.proof_entry_type in
+ let body, eff = Future.force entry.Declare.proof_entry_body in
let (body, cstr) = Safe_typing.inline_private_constants env (body, eff.Evd.seff_private) in
let sigma = Evd.from_ctx uctx in
let sigma = Evd.merge_context_set ~sideff:true Evd.univ_rigid sigma cstr in
@@ -514,7 +503,7 @@ let obligation_terminator entries uctx { name; num; auto } =
let obls, rem = prg.prg_obligations in
let obl = obls.(num) in
let status =
- match obl.obl_status, entry.proof_entry_opaque with
+ match obl.obl_status, entry.Declare.proof_entry_opaque with
| (_, Evar_kinds.Expand), true -> err_not_transp ()
| (true, _), true -> err_not_transp ()
| (false, _), true -> Evar_kinds.Define true