[commit: ghc] wip/nested-cpr: Allow the CPR w/w to take unboxed tuples apart (61c15f2)

git at git.haskell.org git at git.haskell.org
Mon Dec 16 20:59:52 UTC 2013


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/nested-cpr
Link       : http://ghc.haskell.org/trac/ghc/changeset/61c15f22dbc9ea30a9fd0d9e2d9e8ad49c9f9b99/ghc

>---------------------------------------------------------------

commit 61c15f22dbc9ea30a9fd0d9e2d9e8ad49c9f9b99
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Thu Nov 28 10:29:47 2013 +0000

    Allow the CPR w/w to take unboxed tuples apart


>---------------------------------------------------------------

61c15f22dbc9ea30a9fd0d9e2d9e8ad49c9f9b99
 compiler/stranal/WwLib.lhs |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler/stranal/WwLib.lhs b/compiler/stranal/WwLib.lhs
index ce4112c..5168d8f 100644
--- a/compiler/stranal/WwLib.lhs
+++ b/compiler/stranal/WwLib.lhs
@@ -502,7 +502,7 @@ deepSplitCprType_maybe :: ConTag -> Type -> Maybe (DataCon, [Type], [Type], Coer
 deepSplitCprType_maybe con_tag ty
   | let (co, ty1) = topNormaliseNewType_maybe ty `orElse` (mkReflCo Representational ty, ty)
   , Just (tc, tc_args) <- splitTyConApp_maybe ty1
-  , isDataTyCon tc
+  , isDataTyCon tc || isUnboxedTupleTyCon tc
   , let cons = tyConDataCons tc
         con = ASSERT( cons `lengthAtLeast` con_tag ) cons !! (con_tag - fIRST_TAG)
   = Just (con, tc_args, dataConInstArgTys con tc_args, co)



More information about the ghc-commits mailing list