summaryrefslogtreecommitdiff
path: root/compiler/specialise/Rules.hs
diff options
context:
space:
mode:
authorEdward Z. Yang <ezyang@cs.stanford.edu>2015-10-10 14:34:21 +0200
committerBen Gamari <ben@smart-cactus.org>2015-10-10 15:41:05 +0200
commit840df33685e8c746ade4b9d4d0eb7c764a773e48 (patch)
tree3f9f176e79b384f01190d6b5c0027a3b44744aa0 /compiler/specialise/Rules.hs
parent182c44da50db028a432a81789048c87922bd30f4 (diff)
downloadhaskell-840df33685e8c746ade4b9d4d0eb7c764a773e48.tar.gz
Rename SpecInfo to RuleInfo (upon SPJ's advice).
Test Plan: validate Reviewers: simonpj, austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1319
Diffstat (limited to 'compiler/specialise/Rules.hs')
-rw-r--r--compiler/specialise/Rules.hs28
1 files changed, 14 insertions, 14 deletions
diff --git a/compiler/specialise/Rules.hs b/compiler/specialise/Rules.hs
index d6a56d6fe4..9b5d3cf763 100644
--- a/compiler/specialise/Rules.hs
+++ b/compiler/specialise/Rules.hs
@@ -16,8 +16,8 @@ module Rules (
-- ** Checking rule applications
ruleCheckProgram,
- -- ** Manipulating 'SpecInfo' rules
- mkSpecInfo, extendSpecInfo, addSpecInfo,
+ -- ** Manipulating 'RuleInfo' rules
+ mkRuleInfo, extendRuleInfo, addRuleInfo,
addIdSpecialisations,
-- * Misc. CoreRule helpers
@@ -43,7 +43,7 @@ import TysPrim ( anyTypeOfKind )
import Coercion
import CoreTidy ( tidyRules )
import Id
-import IdInfo ( SpecInfo( SpecInfo ) )
+import IdInfo ( RuleInfo( RuleInfo ) )
import Var
import VarEnv
import VarSet
@@ -267,30 +267,30 @@ pprRulesForUser rules
{-
************************************************************************
* *
- SpecInfo: the rules in an IdInfo
+ RuleInfo: the rules in an IdInfo
* *
************************************************************************
-}
--- | Make a 'SpecInfo' containing a number of 'CoreRule's, suitable
+-- | Make a 'RuleInfo' containing a number of 'CoreRule's, suitable
-- for putting into an 'IdInfo'
-mkSpecInfo :: [CoreRule] -> SpecInfo
-mkSpecInfo rules = SpecInfo rules (rulesFreeVars rules)
+mkRuleInfo :: [CoreRule] -> RuleInfo
+mkRuleInfo rules = RuleInfo rules (rulesFreeVars rules)
-extendSpecInfo :: SpecInfo -> [CoreRule] -> SpecInfo
-extendSpecInfo (SpecInfo rs1 fvs1) rs2
- = SpecInfo (rs2 ++ rs1) (rulesFreeVars rs2 `unionVarSet` fvs1)
+extendRuleInfo :: RuleInfo -> [CoreRule] -> RuleInfo
+extendRuleInfo (RuleInfo rs1 fvs1) rs2
+ = RuleInfo (rs2 ++ rs1) (rulesFreeVars rs2 `unionVarSet` fvs1)
-addSpecInfo :: SpecInfo -> SpecInfo -> SpecInfo
-addSpecInfo (SpecInfo rs1 fvs1) (SpecInfo rs2 fvs2)
- = SpecInfo (rs1 ++ rs2) (fvs1 `unionVarSet` fvs2)
+addRuleInfo :: RuleInfo -> RuleInfo -> RuleInfo
+addRuleInfo (RuleInfo rs1 fvs1) (RuleInfo rs2 fvs2)
+ = RuleInfo (rs1 ++ rs2) (fvs1 `unionVarSet` fvs2)
addIdSpecialisations :: Id -> [CoreRule] -> Id
addIdSpecialisations id []
= id
addIdSpecialisations id rules
= setIdSpecialisation id $
- extendSpecInfo (idSpecialisation id) rules
+ extendRuleInfo (idSpecialisation id) rules
-- | Gather all the rules for locally bound identifiers from the supplied bindings
rulesOfBinds :: [CoreBind] -> [CoreRule]