summaryrefslogtreecommitdiff
path: root/compiler/specialise
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2015-03-17 00:00:31 +0000
committerSimon Peyton Jones <simonpj@microsoft.com>2015-03-17 12:37:53 +0000
commitdbd929971c05b5a05129029657a354ddfb658e61 (patch)
tree54dab4db28df694eab68b20dd99e555795c20414 /compiler/specialise
parentcf6c30719e503bf67c74b3790ae3adf7e0b81180 (diff)
downloadhaskell-dbd929971c05b5a05129029657a354ddfb658e61.tar.gz
Move declaration of Rulebase from Rules to CoreSyn
This allow HscTypes to import CoreSyn rather than Rules, which makes module loops easier to avoid. At one point in my recent travels this was important; I'm not sure it's so important now, but it's a good thing anyway. In any case CoreRule is defined in CoreSyn, so this move make sense.
Diffstat (limited to 'compiler/specialise')
-rw-r--r--compiler/specialise/Rules.hs8
1 files changed, 1 insertions, 7 deletions
diff --git a/compiler/specialise/Rules.hs b/compiler/specialise/Rules.hs
index b66d973248..e6e5359f5a 100644
--- a/compiler/specialise/Rules.hs
+++ b/compiler/specialise/Rules.hs
@@ -9,9 +9,6 @@
-- | Functions for collecting together and applying rewrite rules to a module.
-- The 'CoreRule' datatype itself is declared elsewhere.
module Rules (
- -- * RuleBase
- RuleBase,
-
-- ** Constructing
emptyRuleBase, mkRuleBase, extendRuleBaseList,
unionRuleBase, pprRuleBase,
@@ -315,10 +312,7 @@ but that isn't quite right:
************************************************************************
-}
--- | Gathers a collection of 'CoreRule's. Maps (the name of) an 'Id' to its rules
-type RuleBase = NameEnv [CoreRule]
- -- The rules are are unordered;
- -- we sort out any overlaps on lookup
+-- RuleBase itself is defined in CoreSyn, along with CoreRule
emptyRuleBase :: RuleBase
emptyRuleBase = emptyNameEnv