aboutsummaryrefslogtreecommitdiffhomepage
path: root/kernel/term_typing.ml
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 /kernel/term_typing.ml
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 'kernel/term_typing.ml')
-rw-r--r--kernel/term_typing.ml5
1 files changed, 2 insertions, 3 deletions
diff --git a/kernel/term_typing.ml b/kernel/term_typing.ml
index 283febed2..eee227370 100644
--- a/kernel/term_typing.ml
+++ b/kernel/term_typing.ml
@@ -131,8 +131,7 @@ let inline_side_effects env body ctx side_eff =
(subst, var + 1, ctx, (cname c, b, ty, opaque) :: args)
| Polymorphic_const auctx ->
(** Inline the term to emulate universe polymorphism *)
- let data = (Univ.AUContext.instance auctx, b) in
- let subst = Cmap_env.add c (Inl data) subst in
+ let subst = Cmap_env.add c (Inl b) subst in
(subst, var, ctx, args)
in
let (subst, len, ctx, args) = List.fold_left fold (Cmap_env.empty, 1, ctx, []) side_eff in
@@ -142,7 +141,7 @@ let inline_side_effects env body ctx side_eff =
let data = try Some (Cmap_env.find c subst) with Not_found -> None in
begin match data with
| None -> t
- | Some (Inl (inst, b)) ->
+ | Some (Inl b) ->
(** [b] is closed but may refer to other constants *)
subst_const i k (Vars.subst_instance_constr u b)
| Some (Inr n) ->