X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fvectorise%2FVectType.hs;h=86dcaf236b3e5b93449e2f51947aaadae2e3cdb2;hb=0c73c54dba7b8385a82507ef06beb7292f270e5d;hp=9bf11e6708cb1272ed89539cb19052265afabba8;hpb=d622593f562e74f734b4b6929de5d8258cf30278;p=ghc-hetmet.git diff --git a/compiler/vectorise/VectType.hs b/compiler/vectorise/VectType.hs index 9bf11e6..86dcaf2 100644 --- a/compiler/vectorise/VectType.hs +++ b/compiler/vectorise/VectType.hs @@ -366,8 +366,8 @@ arrShapeTys (EnumRepr {}) = sumShapeTys sumShapeTys :: VM [Type] sumShapeTys = do - int_arr <- builtin parrayIntPrimTyCon - return [intPrimTy, mkTyConApp int_arr [], mkTyConApp int_arr []] + int_arr <- builtin intPrimArrayTy + return [intPrimTy, int_arr, int_arr] arrShapeVars :: Repr -> VM [Var] @@ -431,7 +431,7 @@ arrReprVars repr 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 @@ -1022,7 +1022,7 @@ fromVect (FunTy arg_ty res_ty) expr 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