aboutsummaryrefslogtreecommitdiff
path: root/library
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 /library
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 'library')
-rw-r--r--library/library.ml10
-rw-r--r--library/library.mli2
2 files changed, 8 insertions, 4 deletions
diff --git a/library/library.ml b/library/library.ml
index e3b8511af1..0a57a85c35 100644
--- a/library/library.ml
+++ b/library/library.ml
@@ -280,7 +280,7 @@ type 'a table_status =
| Fetched of 'a option array
let opaque_tables =
- ref (LibraryMap.empty : (Constr.constr table_status) LibraryMap.t)
+ ref (LibraryMap.empty : ((Opaqueproof.cooking_info list * int * Constr.constr) table_status) LibraryMap.t)
let add_opaque_table dp st =
opaque_tables := LibraryMap.add dp st !opaque_tables
@@ -306,10 +306,14 @@ let access_table what tables dp i =
let access_opaque_table dp i =
let what = "opaque proofs" in
- access_table what opaque_tables dp i
+ let ans = access_table what opaque_tables dp i in
+ match ans with
+ | None -> None
+ | Some (info, n, c) -> Some (Cooking.cook_constr info n c)
let indirect_accessor = {
Opaqueproof.access_proof = access_opaque_table;
+ Opaqueproof.access_discharge = Cooking.cook_constr;
}
(************************************************************************)
@@ -320,7 +324,7 @@ type seg_lib = library_disk
type seg_univ = (* true = vivo, false = vi *)
Univ.ContextSet.t * bool
type seg_discharge = Opaqueproof.cooking_info list array
-type seg_proofs = Constr.constr option array
+type seg_proofs = (Opaqueproof.cooking_info list * int * Constr.t) option array
let mk_library sd md digests univs =
{
diff --git a/library/library.mli b/library/library.mli
index 142206e2c5..0c5d6e33c1 100644
--- a/library/library.mli
+++ b/library/library.mli
@@ -36,7 +36,7 @@ type seg_lib
type seg_univ = (* all_cst, finished? *)
Univ.ContextSet.t * bool
type seg_discharge = Opaqueproof.cooking_info list array
-type seg_proofs = Constr.constr option array
+type seg_proofs = (Opaqueproof.cooking_info list * int * Constr.t) option array
(** Open a module (or a library); if the boolean is true then it's also
an export otherwise just a simple import *)