[commit: ghc] wip/nested-cpr: Fix a lubDmdResult equation (dc45272)

git at git.haskell.org git at git.haskell.org
Thu Dec 5 19:00:14 UTC 2013


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

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

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

commit dc45272e9cf69a4e75fd96e6e60e6f186740f8ab
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Tue Nov 26 10:17:57 2013 +0000

    Fix a lubDmdResult equation


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

dc45272e9cf69a4e75fd96e6e60e6f186740f8ab
 compiler/basicTypes/Demand.lhs |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/compiler/basicTypes/Demand.lhs b/compiler/basicTypes/Demand.lhs
index 06ac324..97dc453 100644
--- a/compiler/basicTypes/Demand.lhs
+++ b/compiler/basicTypes/Demand.lhs
@@ -747,8 +747,10 @@ lubCPR (RetProd ds1) (RetProd ds2)
 lubCPR _ _                         = NoCPR
 
 lubDmdResult :: DmdResult -> DmdResult -> DmdResult
-lubDmdResult Diverges       r              = r
-lubDmdResult (Converges c1) Diverges       = Converges c1
+lubDmdResult Diverges       (Dunno c2)     = Dunno c2
+lubDmdResult Diverges       Diverges       = Diverges
+lubDmdResult Diverges       (Converges c2) = Dunno c2
+lubDmdResult (Converges c1) Diverges       = Dunno c1
 lubDmdResult (Converges c1) (Converges c2) = Converges (c1 `lubCPR` c2)
 lubDmdResult (Converges c1) (Dunno c2)     = Dunno (c1 `lubCPR` c2)
 lubDmdResult (Dunno c1)     Diverges       = Dunno c1



More information about the ghc-commits mailing list