diff options
author | Ben Lippmeier <benl@ouroborus.net> | 2011-11-17 13:30:58 +1100 |
---|---|---|
committer | Ben Lippmeier <benl@ouroborus.net> | 2011-11-17 13:30:58 +1100 |
commit | 4902a276b2df5a1a690a6ae865404a8167a70bf1 (patch) | |
tree | f282960c7f1f1ad22115a691983a0e27d42a8894 /compiler/vectorise/Vectorise/Generic/Description.hs | |
parent | 71fee325bee7657e30a193ee0261d72f5175cb8e (diff) | |
download | haskell-4902a276b2df5a1a690a6ae865404a8167a70bf1.tar.gz |
vectoriser: Use Sels2 type for vector of selectors in PDatas Sum2 instance
Diffstat (limited to 'compiler/vectorise/Vectorise/Generic/Description.hs')
-rw-r--r-- | compiler/vectorise/Vectorise/Generic/Description.hs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/compiler/vectorise/Vectorise/Generic/Description.hs b/compiler/vectorise/Vectorise/Generic/Description.hs index 8a60d57f79..9bffff1302 100644 --- a/compiler/vectorise/Vectorise/Generic/Description.hs +++ b/compiler/vectorise/Vectorise/Generic/Description.hs @@ -46,9 +46,12 @@ data SumRepr -- | PDatas version of the sum tycon (eg PDatasSum2) , repr_psums_tc :: TyCon - -- | Type of the selector (eg Sel2) + -- | Type of the selector (eg Sel2) , repr_sel_ty :: Type + -- | Type of multi-selector (eg Sel2s) + , repr_sels_ty :: Type + -- | Type of each data constructor. , repr_con_tys :: [Type] @@ -128,11 +131,13 @@ tyConRepr tc psums_tc <- liftM fst $ pdatasReprTyCon sumapp sel_ty <- builtin (selTy arity) + sels_ty <- builtin (selsTy arity) return $ Sum { repr_sum_tc = sum_tc , repr_psum_tc = psum_tc , repr_psums_tc = psums_tc , repr_sel_ty = sel_ty + , repr_sels_ty = sels_ty , repr_con_tys = tys , repr_cons = rs } @@ -217,12 +222,13 @@ instance Outputable SumRepr where UnarySum con -> sep [text "UnarySum", ppr con] - Sum sumtc psumtc psumstc selty contys cons + Sum sumtc psumtc psumstc selty selsty contys cons -> text "Sum" $+$ braces (nest 4 $ sep [ text "repr_sum_tc = " <> ppr sumtc , text "repr_psum_tc = " <> ppr psumtc , text "repr_psums_tc = " <> ppr psumstc , text "repr_sel_ty = " <> ppr selty + , text "repr_sels_ty = " <> ppr selsty , text "repr_con_tys = " <> ppr contys , text "repr_cons = " <> ppr cons]) |