diff options
author | simonpj@microsoft.com <unknown> | 2007-05-03 12:47:59 +0000 |
---|---|---|
committer | simonpj@microsoft.com <unknown> | 2007-05-03 12:47:59 +0000 |
commit | 59a4ad63f93f4fd7b8ede74bb2ea36778fe25e06 (patch) | |
tree | 453586dc4e28f58a309e66b59e794e5aa9b81cc0 /compiler/specialise/Rules.lhs | |
parent | de905f504a3e129e2c4a1906d7e0a26e36cd6c4b (diff) | |
download | haskell-59a4ad63f93f4fd7b8ede74bb2ea36778fe25e06.tar.gz |
Fix dependency information for RULES
A SpecInfo (inside IdInfo) keeps track of the free variables of a RULE
so that the occurrency analyser knows about its dependencies.
Previously it was only tracking the *rhs* free vars, but it should
really include the *lhs* ones too. See Note [Rule dependency info]
in IdInfo.
This fixes a WARNING when compiling some libraries.
Diffstat (limited to 'compiler/specialise/Rules.lhs')
-rw-r--r-- | compiler/specialise/Rules.lhs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/specialise/Rules.lhs b/compiler/specialise/Rules.lhs index fb0ad40124..ed9f2388bc 100644 --- a/compiler/specialise/Rules.lhs +++ b/compiler/specialise/Rules.lhs @@ -20,7 +20,7 @@ module Rules ( import CoreSyn -- All of it import OccurAnal ( occurAnalyseExpr ) -import CoreFVs ( exprFreeVars, exprsFreeVars, bindFreeVars, rulesRhsFreeVars ) +import CoreFVs ( exprFreeVars, exprsFreeVars, bindFreeVars, rulesFreeVars ) import CoreUnfold ( isCheapUnfolding, unfoldingTemplate ) import CoreUtils ( tcEqExprX, exprType ) import PprCore ( pprRules ) @@ -136,11 +136,11 @@ ruleCantMatch ts as = False \begin{code} mkSpecInfo :: [CoreRule] -> SpecInfo -mkSpecInfo rules = SpecInfo rules (rulesRhsFreeVars rules) +mkSpecInfo rules = SpecInfo rules (rulesFreeVars rules) extendSpecInfo :: SpecInfo -> [CoreRule] -> SpecInfo extendSpecInfo (SpecInfo rs1 fvs1) rs2 - = SpecInfo (rs2 ++ rs1) (rulesRhsFreeVars rs2 `unionVarSet` fvs1) + = SpecInfo (rs2 ++ rs1) (rulesFreeVars rs2 `unionVarSet` fvs1) addSpecInfo :: SpecInfo -> SpecInfo -> SpecInfo addSpecInfo (SpecInfo rs1 fvs1) (SpecInfo rs2 fvs2) |