diff options
author | Ian Lynagh <igloo@earth.li> | 2011-04-01 15:16:30 +0100 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2011-04-01 15:16:30 +0100 |
commit | 40769ea371095f2446cb3ee30c778ff35ca00481 (patch) | |
tree | 7f4b7a5d8ee78e5fbe2d355935bd65dc8e26dde4 /compiler/simplCore/OccurAnal.lhs | |
parent | 5cfe9e92a92201043d5dbb1c4e10fef0ed0d9f49 (diff) | |
download | haskell-40769ea371095f2446cb3ee30c778ff35ca00481.tar.gz |
Really zap case-binder occurrence info: solves #5028
Converted from a darcs patch from Max Bolingbroke:
Fri Apr 1 11:39:49 BST 2011 Max Bolingbroke <batterseapower@hotmail.com>
* Really zap case-binder occurrence info: solves #5028
Diffstat (limited to 'compiler/simplCore/OccurAnal.lhs')
-rw-r--r-- | compiler/simplCore/OccurAnal.lhs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/simplCore/OccurAnal.lhs b/compiler/simplCore/OccurAnal.lhs index ae8d96070f..7692b628ab 100644 --- a/compiler/simplCore/OccurAnal.lhs +++ b/compiler/simplCore/OccurAnal.lhs @@ -1146,7 +1146,7 @@ wrapProxy (bndr, rhs_var, co) (body_usg, body) where (body_usg', tagged_bndr) = tagBinder body_usg bndr rhs_usg = unitVarEnv rhs_var NoOccInfo -- We don't need exact info - rhs = mkCoerceI co (Var rhs_var) + rhs = mkCoerceI co (Var (zapIdOccInfo rhs_var)) -- See Note [Zap case binders in proxy bindings] \end{code} @@ -1582,8 +1582,7 @@ extendProxyEnv pe scrut co case_bndr | otherwise = PE env2 fvs2 -- don't extend where PE env1 fvs1 = trimProxyEnv pe [case_bndr] - zapped_case_bndr = zapIdOccInfo case_bndr -- See Note [Zap case binders in proxy bindings] - env2 = extendVarEnv_Acc add single env1 scrut1 (zapped_case_bndr,co) + env2 = extendVarEnv_Acc add single env1 scrut1 (case_bndr,co) single cb_co = (scrut1, [cb_co]) add cb_co (x, cb_cos) = (x, cb_co:cb_cos) fvs2 = fvs1 `unionVarSet` freeVarsCoI co |