Skip to content

Commit

Permalink
Reset the demand info on bindings going to top level (since they cann…
Browse files Browse the repository at this point in the history
…ot be strict)
  • Loading branch information
simonpj@microsoft.com committed Feb 2, 2007
1 parent 42b37bc commit 9832b55
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions compiler/simplCore/SetLevels.lhs
Expand Up @@ -842,9 +842,11 @@ cloneRecVars NotTopLevel env@(_,_,subst,_) vs ctxt_lvl dest_lvl
returnUs (env', vs2)
-- VERY IMPORTANT: we must zap the demand info
-- if the thing is going to float out past a lambda
-- if the thing is going to float out past a lambda,
-- or if it's going to top level (where things can't be strict)
zap_demand dest_lvl ctxt_lvl id
| ctxt_lvl == dest_lvl = id -- Stays put
| otherwise = zapDemandIdInfo id -- Floats out
| ctxt_lvl == dest_lvl,
not (isTopLvl dest_lvl) = id -- Stays, and not going to top level
| otherwise = zapDemandIdInfo id -- Floats out
\end{code}

0 comments on commit 9832b55

Please sign in to comment.