X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=compiler%2Fvectorise%2FVectType.hs;h=2f4ca2f6016196c18c195a3b3efce9c641ccb6d0;hb=51ad52d4f7d259b500543404f419ff62456e2097;hp=34a37bf99b3d2009fe0322b8a9bcee0df3c7df17;hpb=ad94d40948668032189ad22a0ad741ac1f645f50;p=ghc-hetmet.git diff --git a/compiler/vectorise/VectType.hs b/compiler/vectorise/VectType.hs index 34a37bf..2f4ca2f 100644 --- a/compiler/vectorise/VectType.hs +++ b/compiler/vectorise/VectType.hs @@ -2,11 +2,12 @@ -- The above warning supression flag is a temporary kludge. -- While working on this module you are encouraged to remove it and fix -- any warnings in the module. See --- http://hackage.haskell.org/trac/ghc/wiki/CodingStyle#Warnings +-- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings -- 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