From 464c680b631e1ba892f2171a36002d6ca184bc4f Mon Sep 17 00:00:00 2001 From: Hugo Herbelin Date: Thu, 22 Sep 2016 11:14:37 +0200 Subject: Fixing #5095 (non relevant too strict test in let-in abstraction). --- pretyping/unification.ml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'pretyping') diff --git a/pretyping/unification.ml b/pretyping/unification.ml index cd0bbfa300..347bf6f9e5 100644 --- a/pretyping/unification.ml +++ b/pretyping/unification.ml @@ -1570,14 +1570,7 @@ let make_abstraction_core name (test,out) env sigma c ty occs check_occs concl = let compute_dependency _ (hyp,_,_ as d) (sign,depdecls) = match occurrences_of_hyp hyp occs with | NoOccurrences, InHyp -> - if indirectly_dependent c d depdecls then - (* Told explicitly not to abstract over [d], but it is dependent *) - let id' = indirect_dependency d depdecls in - errorlabstrm "" (str "Cannot abstract over " ++ Nameops.pr_id id' - ++ str " without also abstracting or erasing " ++ Nameops.pr_id hyp - ++ str ".") - else - (push_named_context_val d sign,depdecls) + (push_named_context_val d sign,depdecls) | AllOccurrences, InHyp as occ -> let occ = if likefirst then LikeFirst else AtOccs occ in let newdecl = replace_term_occ_decl_modulo occ test mkvarid d in -- cgit v1.2.3