X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FsimplCore%2FLiberateCase.lhs;fp=compiler%2FsimplCore%2FLiberateCase.lhs;h=9f03adfe1d08c45d01b421a6ad5b326a2ecb0dd3;hb=4899cc823373bd016a49cdb0dffd0e22150ec07e;hp=a7b613dbb5d51cbd99c0b8c900ea3d955cf61f91;hpb=d81eedc942376d81428293a67e99a80676222e39;p=ghc-hetmet.git diff --git a/compiler/simplCore/LiberateCase.lhs b/compiler/simplCore/LiberateCase.lhs index a7b613d..9f03adf 100644 --- a/compiler/simplCore/LiberateCase.lhs +++ b/compiler/simplCore/LiberateCase.lhs @@ -274,10 +274,9 @@ mkCase :: LibCaseEnv -> CoreExpr -> Id -> Type -> [CoreAlt] -> CoreExpr -- See Note [Indexed data types] mkCase env scrut bndr ty [(DEFAULT,_,rhs)] | Just (tycon, tys) <- splitTyConApp_maybe (idType bndr) - , [(subst, fam_inst)] <- lookupFamInstEnv (lc_fams env) tycon tys + , [(fam_inst, rep_tys)] <- lookupFamInstEnv (lc_fams env) tycon tys = let rep_tc = famInstTyCon fam_inst - rep_tys = map (substTyVar subst) (tyConTyVars rep_tc) bndr' = setIdType bndr (mkTyConApp rep_tc rep_tys) Just co_tc = tyConFamilyCoercion_maybe rep_tc co = mkTyConApp co_tc rep_tys