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

git at git.haskell.org git at git.haskell.org
Tue Dec 10 11:19:04 UTC 2013


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

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

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

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

    Temporarily disable nested CPR inside sum types


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

142eb5ae1fda84d16b180bf40bbe94d3cc54376c
 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 16165a2..dc88692 100644
--- a/compiler/basicTypes/Demand.lhs
+++ b/compiler/basicTypes/Demand.lhs
@@ -861,7 +861,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)
 
 getDmdResult :: DmdType -> DmdResult
 getDmdResult (DmdType _ [] r) = r       -- Only for data-typed arguments!



More information about the ghc-commits mailing list