Commit 6febc444 authored by Krzysztof Gogolewski's avatar Krzysztof Gogolewski Committed by Marge Bot

Fix assertion failures reported in #16533

parent 9b142c53
......@@ -1015,7 +1015,7 @@ can_eq_nc_forall ev eq_rel s1 s2
-- Done: unify phi1 ~ phi2
go [] subst bndrs2
= ASSERT( null bndrs2 )
unify loc (eqRelRole eq_rel) phi1' (substTy subst phi2)
unify loc (eqRelRole eq_rel) phi1' (substTyUnchecked subst phi2)
go _ _ _ = panic "cna_eq_nc_forall" -- case (s:ss) []
......
......@@ -515,7 +515,7 @@ tcInstSig hs_sig@(PartialSig { psig_hs_ty = hs_ty
, sig_inst_skols = tv_prs
, sig_inst_wcs = wcs
, sig_inst_wcx = wcx
, sig_inst_theta = substTys subst theta
, sig_inst_theta = substTysUnchecked subst theta
, sig_inst_tau = substTyUnchecked subst tau }
; traceTc "End partial sig }" (ppr inst_sig)
; return inst_sig }
......
......@@ -118,8 +118,8 @@ optCoercion' env co
(Pair in_ty1 in_ty2, in_role) = coercionKindRole co
(Pair out_ty1 out_ty2, out_role) = coercionKindRole out_co
in
ASSERT2( substTy env in_ty1 `eqType` out_ty1 &&
substTy env in_ty2 `eqType` out_ty2 &&
ASSERT2( substTyUnchecked env in_ty1 `eqType` out_ty1 &&
substTyUnchecked env in_ty2 `eqType` out_ty2 &&
in_role == out_role
, text "optCoercion changed types!"
$$ hang (text "in_co:") 2 (ppr co)
......
......@@ -1044,7 +1044,7 @@ piResultTys ty orig_args@(arg:args)
init_subst = mkEmptyTCvSubst $ mkInScopeSet (tyCoVarsOfTypes (ty:orig_args))
go :: TCvSubst -> Type -> [Type] -> Type
go subst ty [] = substTy subst ty
go subst ty [] = substTyUnchecked subst ty
go subst ty all_args@(arg:args)
| Just ty' <- coreView ty
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment