[commit: ghc] wip/nested-cpr: Temporarily disable nested CPR inside sum types (291f5e7)

git at git.haskell.org git at git.haskell.org
Sat Dec 14 22:32:04 UTC 2013


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

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

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

commit 291f5e7fb01a0f70203be14ae321e1d57e115a9e
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Tue Dec 10 10:12:46 2013 +0000

    Temporarily disable nested CPR inside sum types


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

291f5e7fb01a0f70203be14ae321e1d57e115a9e
 compiler/basicTypes/Demand.lhs |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler/basicTypes/Demand.lhs b/compiler/basicTypes/Demand.lhs
index 721cfc9..8abcbcd 100644
--- a/compiler/basicTypes/Demand.lhs
+++ b/compiler/basicTypes/Demand.lhs
@@ -865,7 +865,7 @@ cprConRes isProd tag arg_ress
   | opt_NestedCprOff = Converges $ cutCPRResult flatCPRDepth $ retCon arg_ress
   | otherwise        = Converges $ cutCPRResult maxCPRDepth  $ retCon arg_ress
   where retCon | isProd    = RetProd
-               | otherwise = RetSum tag
+               | otherwise = RetSum tag . map (const topRes)
 
 vanillaCprConRes :: Bool -> ConTag -> Arity -> DmdResult
 vanillaCprConRes isProd tag arity = cprConRes isProd tag (replicate arity topRes)



More information about the ghc-commits mailing list