aboutsummaryrefslogtreecommitdiff
path: root/checker/mod_checking.ml
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2019-05-31 14:27:36 +0200
committerPierre-Marie Pédrot2019-06-04 11:16:17 +0200
commite7ffa1bfa25300a25c1e81583b77d2d7587bbb5d (patch)
treef3b9bc7307d04f2757b3d00504100023bc9f2d9a /checker/mod_checking.ml
parent589aaf4f97d5cfcdabfda285739228f5ee52261f (diff)
Do not substitute opaque constants when discharging.
Instead we do that on a by-need basis by reusing the section info already stored in the opaque proof.
Diffstat (limited to 'checker/mod_checking.ml')
-rw-r--r--checker/mod_checking.ml12
1 files changed, 6 insertions, 6 deletions
diff --git a/checker/mod_checking.ml b/checker/mod_checking.ml
index ccce0bd9a7..0684623a81 100644
--- a/checker/mod_checking.ml
+++ b/checker/mod_checking.ml
@@ -8,13 +8,13 @@ open Environ
(** {6 Checking constants } *)
-let get_proof = ref (fun _ _ -> assert false)
-let set_indirect_accessor f = get_proof := f
-
-let indirect_accessor = {
- Opaqueproof.access_proof = (fun dp n -> !get_proof dp n);
+let indirect_accessor = ref {
+ Opaqueproof.access_proof = (fun _ _ -> assert false);
+ Opaqueproof.access_discharge = (fun _ _ _ -> assert false);
}
+let set_indirect_accessor f = indirect_accessor := f
+
let check_constant_declaration env kn cb =
Flags.if_verbose Feedback.msg_notice (str " checking cst:" ++ Constant.print kn);
(* Locally set the oracle for further typechecking *)
@@ -40,7 +40,7 @@ let check_constant_declaration env kn cb =
let body = match cb.const_body with
| Undef _ | Primitive _ -> None
| Def c -> Some (Mod_subst.force_constr c)
- | OpaqueDef o -> Some (Opaqueproof.force_proof indirect_accessor otab o)
+ | OpaqueDef o -> Some (Opaqueproof.force_proof !indirect_accessor otab o)
in
let () =
match body with