aboutsummaryrefslogtreecommitdiffhomepage
path: root/library/declare.ml
diff options
context:
space:
mode:
authorGravatar Matthieu Sozeau <mattam@mattam.org>2013-11-08 11:31:22 +0100
committerGravatar Matthieu Sozeau <mattam@mattam.org>2014-05-06 09:58:58 +0200
commit1ed00e4f8cded2a2024b66c3f7f4deee6ecd7c83 (patch)
tree471afc13a25bfe689d30447a6042c9f62c72f92e /library/declare.ml
parent62fb849cf9410ddc2d9f355570f4fb859f3044c3 (diff)
- Fix bug preventing apply from unfolding Fixpoints.
- Remove Universe Polymorphism flags everywhere. - Properly infer, discharge template arities and fix substitution inside them (kernel code to check for correctness). - Fix tactics that were supposing universe polymorphic constants/inductives to be parametric on that status. Required to make interp_constr* return the whole evar universe context now. - Fix the univ/level/instance hashconsing to respect the fact that marshalling doesn't preserve sharing, sadly losing most of its benefits. Short-term solution is to add hashes to these for faster comparison, longer term requires rewriting all serialization code. Conflicts: kernel/univ.ml tactics/tactics.ml theories/Logic/EqdepFacts.v
Diffstat (limited to 'library/declare.ml')
-rw-r--r--library/declare.ml9
1 files changed, 5 insertions, 4 deletions
diff --git a/library/declare.ml b/library/declare.ml
index 97445755f..e92225637 100644
--- a/library/declare.ml
+++ b/library/declare.ml
@@ -126,7 +126,7 @@ let open_constant i ((sp,kn), obj) =
| (Def _ | Undef _) -> ()
| OpaqueDef lc ->
match Opaqueproof.get_constraints lc with
- | Some f when Future.is_val f -> Global.push_context (Future.force f)
+ | Some f when Future.is_val f -> Global.push_context_set (Future.force f)
| _ -> ()
let exists_name id =
@@ -196,7 +196,7 @@ let declare_constant_common id cst =
let definition_entry ?(opaque=false) ?(inline=false) ?types
?(poly=false) ?(univs=Univ.UContext.empty) ?(eff=Declareops.no_seff) body =
- { const_entry_body = Future.from_val (body,eff);
+ { const_entry_body = Future.from_val ((body,Univ.ContextSet.empty), eff);
const_entry_secctx = None;
const_entry_type = types;
const_entry_proj = None;
@@ -216,8 +216,9 @@ let declare_sideff se =
let id_of c = Names.Label.to_id (Names.Constant.label c) in
let pt_opaque_of cb =
match cb with
- | { const_body = Def sc } -> Mod_subst.force_constr sc, false
- | { const_body = OpaqueDef fc } -> Opaqueproof.force_proof fc, true
+ | { const_body = Def sc } -> (Mod_subst.force_constr sc, Univ.ContextSet.empty), false
+ | { const_body = OpaqueDef fc } ->
+ (Opaqueproof.force_proof fc, Opaqueproof.force_constraints fc), true
| { const_body = Undef _ } -> anomaly(str"Undefined side effect")
in
let ty_of cb =