Skip to content

Commit

Permalink
Merge PR coq#7787: Fixes coq#7780: missing lift in expanding alias un…
Browse files Browse the repository at this point in the history
…der a binder in unification
  • Loading branch information
mattam82 committed Jun 14, 2018
2 parents 80b7287 + 9b90746 commit e40e2e7
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pretyping/evarsolve.ml
Original file line number Diff line number Diff line change
Expand Up @@ -929,7 +929,7 @@ let invert_arg_from_subst evd aliases k0 subst_in_env_extended_with_k_binders c_
with Not_found ->
match expand_alias_once evd aliases t with
| None -> raise Not_found
| Some c -> aux k c in
| Some c -> aux k (lift k c) in
try
let c = aux 0 c_in_env_extended_with_k_binders in
Invertible (UniqueProjection (c,!effects))
Expand Down
16 changes: 16 additions & 0 deletions test-suite/bugs/closed/7780.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
(* A lift was missing in expanding aliases under binders for unification *)

(* Below, the lift was missing while expanding the reference to
[mkcons] in [?N] which was under binder [arg] *)

Goal forall T (t : T) (P P0 : T -> Set), option (option (list (P0 t)) -> option (list (P t))).
intros ????.
refine (Some
(fun rls
=> let mkcons := ?[M] in
let default arg := ?[N] in
match rls as rls (* 2 *) return option (list (P ?[O])) with
| Some _ => None
| None => None
end)).
Abort.

0 comments on commit e40e2e7

Please sign in to comment.