X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fvectorise%2FVectType.hs;h=d2a9b06398c1553ff5df54d6cba5d5501c878ca4;hb=f83010b119096699d1efef2f7bb45460719c48f9;hp=aed3e2a2abe8448196b38f32be782c88b1b10157;hpb=8d5e92db87d0afaa3c45bb62bdde0745ffb60e34;p=ghc-hetmet.git diff --git a/compiler/vectorise/VectType.hs b/compiler/vectorise/VectType.hs index aed3e2a..d2a9b06 100644 --- a/compiler/vectorise/VectType.hs +++ b/compiler/vectorise/VectType.hs @@ -299,7 +299,7 @@ buildPADict (PAInstance { pa_dc <- builtin paDictDataCon let dict = mkConApp pa_dc (Type (mkTyConApp vect_tc arg_tys) : meth_exprs) body = Let (Rec meth_binds) dict - return [(instanceDFunId inst, abstract body)] + return [(instanceDFunId inst, mkInlineMe $ abstract body)] where tvs = tyConTyVars arr_tc arg_tys = mkTyVarTys tvs @@ -370,12 +370,14 @@ buildReplicatePA vect_tc arr_tc shape <- replicatePA len (ctr_num val) reprs <- liftM concat $ mapM (mk_comp_arrs len val) vect_dcs - + return . mkLams [len_var, val_var] - $ mkConApp arr_dc (map (Type . TyVarTy) (tyConTyVars arr_tc) ++ (shape : reprs)) + . wrapFamInstBody arr_tc arg_tys + $ mkConApp arr_dc (map Type arg_tys ++ (shape : reprs)) where - val_ty = mkTyConApp vect_tc . mkTyVarTys $ tyConTyVars arr_tc - wild = mkWildId val_ty + arg_tys = mkTyVarTys (tyConTyVars arr_tc) + val_ty = mkTyConApp vect_tc arg_tys + wild = mkWildId val_ty vect_dcs = tyConDataCons vect_tc [arr_dc] = tyConDataCons arr_tc @@ -398,7 +400,7 @@ buildReplicatePA vect_tc arr_tc arr_ty <- mkPArrayType ty return $ Case val wild arr_ty - [(DataAlt dc, pre ++ (var : post), rep), (DEFAULT, [], empty)] + [(DEFAULT, [], empty), (DataAlt dc, pre ++ (var : post), rep)] -- | Split the given tycons into two sets depending on whether they have to be -- converted (first list) or not (second list). The first argument contains