aboutsummaryrefslogtreecommitdiffhomepage
path: root/pretyping
diff options
context:
space:
mode:
authorGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2017-07-07 16:33:47 +0200
committerGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2017-07-11 14:50:47 +0200
commit0d9a91113c4112eece0680e433f435fdfb39ea4b (patch)
treecf90d290a92c02a2297b3a13b77190db9aa4db70 /pretyping
parentb5ad6a80107f196fa8ffcc4f5dff58bea8c4f70e (diff)
Getting rid of simple calls to AUContext.instance.
This function breaks the abstraction barrier of abstract universe contexts, as it provides a way to observe the bound names of such a context. We remove all the uses that can be easily get rid of with the current API.
Diffstat (limited to 'pretyping')
-rw-r--r--pretyping/evarconv.ml5
-rw-r--r--pretyping/reductionops.ml8
2 files changed, 6 insertions, 7 deletions
diff --git a/pretyping/evarconv.ml b/pretyping/evarconv.ml
index b5d195873..2acf6bfe6 100644
--- a/pretyping/evarconv.ml
+++ b/pretyping/evarconv.ml
@@ -353,9 +353,8 @@ let exact_ise_stack2 env evd f sk1 sk2 =
let check_leq_inductives evd cumi u u' =
let u = EConstr.EInstance.kind evd u in
let u' = EConstr.EInstance.kind evd u' in
- let length_ind_instance =
- Univ.Instance.length
- (Univ.AUContext.instance (Univ.ACumulativityInfo.univ_context cumi))
+ let length_ind_instance =
+ Univ.AUContext.size (Univ.ACumulativityInfo.univ_context cumi)
in
let ind_sbcst = Univ.ACumulativityInfo.subtyp_context cumi in
if not ((length_ind_instance = Univ.Instance.length u) &&
diff --git a/pretyping/reductionops.ml b/pretyping/reductionops.ml
index cc1709f1c..3acefa134 100644
--- a/pretyping/reductionops.ml
+++ b/pretyping/reductionops.ml
@@ -1362,12 +1362,12 @@ let sigma_compare_instances ~flex i0 i1 sigma =
raise Reduction.NotConvertible
let sigma_check_inductive_instances cv_pb uinfind u u' sigma =
- let ind_instance =
- Univ.AUContext.instance (Univ.ACumulativityInfo.univ_context uinfind)
+ let len_instance =
+ Univ.AUContext.size (Univ.ACumulativityInfo.univ_context uinfind)
in
let ind_sbctx = Univ.ACumulativityInfo.subtyp_context uinfind in
- if not ((Univ.Instance.length ind_instance = Univ.Instance.length u) &&
- (Univ.Instance.length ind_instance = Univ.Instance.length u')) then
+ if not ((len_instance = Univ.Instance.length u) &&
+ (len_instance = Univ.Instance.length u')) then
anomaly (Pp.str "Invalid inductive subtyping encountered!")
else
let comp_cst =