summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <bgamari.foss@gmail.com>2017-04-28 13:25:17 -0400
committerBen Gamari <ben@smart-cactus.org>2017-04-28 14:18:40 -0400
commit9f9b90f1fb85fef568f535664f55c4674603e65b (patch)
tree6288c3e007bb2071e8387e5cce969c3f8ab77a20
parent228d4670e98e4fd998c847aac38c11ad85aa35a7 (diff)
downloadhaskell-9f9b90f1fb85fef568f535664f55c4674603e65b.tar.gz
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
-rw-r--r--compiler/simplCore/CSE.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/simplCore/CSE.hs b/compiler/simplCore/CSE.hs
index 1495f18af9..95df5f8b09 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
@@ -572,7 +572,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]