diff options
Diffstat (limited to 'compiler/simplCore/LiberateCase.lhs')
-rw-r--r-- | compiler/simplCore/LiberateCase.lhs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/simplCore/LiberateCase.lhs b/compiler/simplCore/LiberateCase.lhs index a7b613dbb5..9f03adfe1d 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 |