[commit: ghc] ghc-8.2: CSE: Fix cut and paste error (70b235c)

git at git.haskell.org git at git.haskell.org
Sun Apr 30 17:26:08 UTC 2017


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

On branch  : ghc-8.2
Link       : http://ghc.haskell.org/trac/ghc/changeset/70b235c26bae131fdf4f19d6fcf5ddf98dfce2bb/ghc

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

commit 70b235c26bae131fdf4f19d6fcf5ddf98dfce2bb
Author: Ben Gamari <bgamari.foss at gmail.com>
Date:   Fri Apr 28 13:25:17 2017 -0400

    CSE: Fix cut and paste error
    
    extendCSRecEnv took the map to be extended from cs_map instead of
    cs_rec_map.  Oops!
    
    Test Plan: Validate
    
    Reviewers: simonpj, austin
    
    Subscribers: rwbarton, thomie
    
    Differential Revision: https://phabricator.haskell.org/D3510
    
    (cherry picked from commit 9f9b90f1fb85fef568f535664f55c4674603e65b)


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

70b235c26bae131fdf4f19d6fcf5ddf98dfce2bb
 compiler/simplCore/CSE.hs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/compiler/simplCore/CSE.hs b/compiler/simplCore/CSE.hs
index ddc5b88..6312a9d 100644
--- a/compiler/simplCore/CSE.hs
+++ b/compiler/simplCore/CSE.hs
@@ -282,7 +282,7 @@ with mutual recursion it's quite hard; but for self-recursive bindings
   Note the \f in the domain of the mapping!
 
 * When we come across the binding for 'g', look up (\g. (\y. ...g...))
-  Bingo we get a hit.  So we can repace the 'g' binding with
+  Bingo we get a hit.  So we can replace the 'g' binding with
      g = f
 
 We can't use cs_map for this, because the key isn't an expression of
@@ -565,7 +565,7 @@ extendCSEnv cse expr triv_expr
 extendCSRecEnv :: CSEnv -> OutId -> OutExpr -> OutExpr -> CSEnv
 -- See Note [CSE for recursive bindings]
 extendCSRecEnv cse bndr expr triv_expr
-  = cse { cs_rec_map = extendCoreMap (cs_map cse) (Lam bndr expr) triv_expr }
+  = cse { cs_rec_map = extendCoreMap (cs_rec_map cse) (Lam bndr expr) triv_expr }
 
 lookupCSRecEnv :: CSEnv -> OutId -> OutExpr -> Maybe OutExpr
 -- See Note [CSE for recursive bindings]



More information about the ghc-commits mailing list