aboutsummaryrefslogtreecommitdiffhomepage
path: root/interp/implicit_quantifiers.ml
diff options
context:
space:
mode:
authorGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2015-07-29 00:50:07 +0200
committerGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2015-07-29 00:53:33 +0200
commit97f33dd00718d49d2ba91eaba2de600d9e95b4d3 (patch)
treeac6e25c0728b506edc23d284f78276e050879317 /interp/implicit_quantifiers.ml
parent524bff66f40908dc3d17b6a18ee4253a2e61093e (diff)
Fixing bug #3811: "Universe annotations confused inside generalizing binders".
The universe instance of the constant was simply dropped by the function interpreting generalizing binders.
Diffstat (limited to 'interp/implicit_quantifiers.ml')
-rw-r--r--interp/implicit_quantifiers.ml16
1 files changed, 8 insertions, 8 deletions
diff --git a/interp/implicit_quantifiers.ml b/interp/implicit_quantifiers.ml
index e304725d4..87f7a6d6e 100644
--- a/interp/implicit_quantifiers.ml
+++ b/interp/implicit_quantifiers.ml
@@ -245,21 +245,21 @@ let combine_params_freevar =
let destClassApp cl =
match cl with
- | CApp (loc, (None, CRef (ref,_)), l) -> loc, ref, List.map fst l
- | CAppExpl (loc, (None, ref,_), l) -> loc, ref, l
- | CRef (ref,_) -> loc_of_reference ref, ref, []
+ | CApp (loc, (None, CRef (ref, inst)), l) -> loc, ref, List.map fst l, inst
+ | CAppExpl (loc, (None, ref, inst), l) -> loc, ref, l, inst
+ | CRef (ref, inst) -> loc_of_reference ref, ref, [], inst
| _ -> raise Not_found
let destClassAppExpl cl =
match cl with
- | CApp (loc, (None, CRef (ref,_)), l) -> loc, ref, l
- | CRef (ref,_) -> loc_of_reference ref, ref, []
+ | CApp (loc, (None, CRef (ref, inst)), l) -> loc, ref, l, inst
+ | CRef (ref, inst) -> loc_of_reference ref, ref, [], inst
| _ -> raise Not_found
let implicit_application env ?(allow_partial=true) f ty =
let is_class =
try
- let (loc, r, _ as clapp) = destClassAppExpl ty in
+ let (_, r, _, _ as clapp) = destClassAppExpl ty in
let (loc, qid) = qualid_of_reference r in
let gr = Nametab.locate qid in
if Typeclasses.is_class gr then Some (clapp, gr) else None
@@ -267,7 +267,7 @@ let implicit_application env ?(allow_partial=true) f ty =
in
match is_class with
| None -> ty, env
- | Some ((loc, id, par), gr) ->
+ | Some ((loc, id, par, inst), gr) ->
let avoid = Id.Set.union env (ids_of_list (free_vars_of_constr_expr ty ~bound:env [])) in
let c, avoid =
let c = class_info gr in
@@ -285,7 +285,7 @@ let implicit_application env ?(allow_partial=true) f ty =
end;
let pars = List.rev (List.combine ci rd) in
let args, avoid = combine_params avoid f par pars in
- CAppExpl (loc, (None, id, None), args), avoid
+ CAppExpl (loc, (None, id, inst), args), avoid
in c, avoid
let implicits_of_glob_constr ?(with_products=true) l =