mkRepr :: TyCon -> VM Repr
mkRepr vect_tc
| [tys] <- rep_tys = boxedProductRepr tys
- | all null rep_tys = enumRepr
+ -- | all null rep_tys = enumRepr
| otherwise = sumRepr =<< mapM unboxedProductRepr rep_tys
where
rep_tys = map dataConRepArgTys $ tyConDataCons vect_tc
vres_ty <- vectType res_ty
apply <- builtin applyClosureVar
body <- fromVect res_ty
- $ Var apply `mkTyApps` [arg_ty, res_ty] `mkApps` [expr, Var arg]
+ $ Var apply `mkTyApps` [varg_ty, vres_ty] `mkApps` [expr, varg]
return $ Lam arg body
fromVect ty expr
= identityConv ty >> return expr