aboutsummaryrefslogtreecommitdiff
path: root/stm
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2019-06-04 13:44:05 +0200
committerPierre-Marie Pédrot2019-06-17 15:20:02 +0200
commit5316d205993bb3fe3f69e8984fe53d4d50aa8d2a (patch)
tree8016562d06949b981a3e58e71103b02aea7f1c44 /stm
parent7e47fea5ce050c8129ba2d6f94e93fbc29763a3b (diff)
Allow to delay polymorphic opaque constants.
We had to move the private opaque constraints out of the constant declaration into the opaque table. The API is not very pretty yet due to a pervasive confusion between monomorphic global constraints and polymorphic local ones, but once we get rid of futures in the kernel this should be magically solved.
Diffstat (limited to 'stm')
-rw-r--r--stm/stm.ml8
1 files changed, 6 insertions, 2 deletions
diff --git a/stm/stm.ml b/stm/stm.ml
index d77e37c910..bae51d1794 100644
--- a/stm/stm.ml
+++ b/stm/stm.ml
@@ -1746,14 +1746,18 @@ end = struct (* {{{ *)
the call to [check_task_aux] above. *)
let uc = Opaqueproof.force_constraints Library.indirect_accessor (Global.opaque_tables ()) o in
let uc = Univ.hcons_universe_context_set uc in
- let (pr, ctx) = Option.get (Global.body_of_constant_body Library.indirect_accessor c) in
+ let (pr, priv, ctx) = Option.get (Global.body_of_constant_body Library.indirect_accessor c) in
(* We only manipulate monomorphic terms here. *)
let () = assert (Univ.AUContext.is_empty ctx) in
+ let () = match priv with
+ | Opaqueproof.PrivateMonomorphic () -> ()
+ | Opaqueproof.PrivatePolymorphic ctx -> assert (Univ.ContextSet.is_empty ctx)
+ in
let pr = Constr.hcons pr in
let (ci, univs, dummy) = p.(bucket) in
let () = assert (Option.is_empty dummy) in
let () = assert (Int.equal (Univ.AUContext.size ctx) univs) in
- p.(bucket) <- ci, univs, Some pr;
+ p.(bucket) <- ci, univs, Some (pr, priv);
Univ.ContextSet.union cst uc, false
let check_task name l i =