X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Fmain%2FTidyPgm.lhs;h=5785fa5bb0107a554e9e25fcdf243486f1d2d7f7;hb=cb2da7a511c2974eb526b8f413f39ebe3c61a6c7;hp=1df4e2a9c784e27d403dfa3c6c0cbe1309090e3a;hpb=e3d6a95f468365f25ccb6bc30cdc53c128d671e8;p=ghc-hetmet.git diff --git a/ghc/compiler/main/TidyPgm.lhs b/ghc/compiler/main/TidyPgm.lhs index 1df4e2a..5785fa5 100644 --- a/ghc/compiler/main/TidyPgm.lhs +++ b/ghc/compiler/main/TidyPgm.lhs @@ -15,7 +15,7 @@ import CoreFVs ( ruleLhsFreeIds, ruleRhsFreeVars, exprSomeFreeVars ) import CoreTidy ( tidyExpr, tidyVarOcc, tidyIdRules ) import PprCore ( pprIdRules ) import CoreLint ( showPass, endPass ) -import CoreUtils ( exprArity, hasNoRedexes ) +import CoreUtils ( exprArity, rhsIsStatic ) import VarEnv import VarSet import Var ( Id, Var ) @@ -619,12 +619,12 @@ hasCafRefs p arity expr | otherwise = NoCafRefs where mentions_cafs = isFastTrue (cafRefs p expr) - is_caf = not (arity > 0 || hasNoRedexes expr) + is_caf = not (arity > 0 || rhsIsStatic expr) -- NB. we pass in the arity of the expression, which is expected -- to be calculated by exprArity. This is because exprArity -- knows how much eta expansion is going to be done by -- CorePrep later on, and we don't want to duplicate that - -- knowledge in hasNoRedexes below. + -- knowledge in rhsIsStatic below. cafRefs p (Var id) -- imported Ids first: