X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Fvectorise%2FVectType.hs;h=2f4ca2f6016196c18c195a3b3efce9c641ccb6d0;hp=c6310544c17651273627168a98a44492b017f30f;hb=51ad52d4f7d259b500543404f419ff62456e2097;hpb=fd399de26f49a14431a07ed4a1351f41781b80ec diff --git a/compiler/vectorise/VectType.hs b/compiler/vectorise/VectType.hs index c631054..2f4ca2f 100644 --- a/compiler/vectorise/VectType.hs +++ b/compiler/vectorise/VectType.hs @@ -6,7 +6,8 @@ -- for details module VectType ( vectTyCon, vectType, vectTypeEnv, - PAInstance, buildPADict ) + mkRepr, arrShapeTys, arrShapeVars, arrSelector, + PAInstance, buildPADict ) where #include "HsVersions.h" @@ -362,6 +363,10 @@ replicateShape (IdRepr _) _ _ = return [] replicateShape (VoidRepr {}) len _ = return [len] replicateShape (EnumRepr {}) len _ = return [len] +arrSelector :: Repr -> [a] -> a +arrSelector (SumRepr {}) [_, sel, _] = sel +arrSelector _ _ = panic "arrSelector" + emptyArrRepr :: Repr -> VM [CoreExpr] emptyArrRepr (SumRepr { sum_components = prods }) = liftM concat $ mapM emptyArrRepr prods