summaryrefslogtreecommitdiff
path: root/compiler/specialise
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2017-03-29 16:08:40 -0400
committerBen Gamari <ben@smart-cactus.org>2017-03-29 16:08:45 -0400
commit04ea4c3f86db4e2cc7b2683f58f2076233039ebf (patch)
tree08e034753aaeca0fff496b5f7f0832fac149b7e1 /compiler/specialise
parent5856c564dff79a5c2b6a92b1c6c350798b538da3 (diff)
downloadhaskell-04ea4c3f86db4e2cc7b2683f58f2076233039ebf.tar.gz
Print module when dumping rules
It is sometimes hard to find where a rule is defined. Printing the module where it comes from will make it much easier to find. Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3378
Diffstat (limited to 'compiler/specialise')
-rw-r--r--compiler/specialise/Rules.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/specialise/Rules.hs b/compiler/specialise/Rules.hs
index 1dcff82f24..83b4e8dd9c 100644
--- a/compiler/specialise/Rules.hs
+++ b/compiler/specialise/Rules.hs
@@ -263,7 +263,7 @@ pprRulesForUser :: DynFlags -> [CoreRule] -> SDoc
pprRulesForUser dflags rules
= withPprStyle (defaultUserStyle dflags) $
pprRules $
- sortBy (comparing ru_name) $
+ sortBy (comparing ruleName) $
tidyRules emptyTidyEnv rules
{-
@@ -420,7 +420,7 @@ findBest target (rule1,ans1) ((rule2,ans2):prs)
| rule2 `isMoreSpecific` rule1 = findBest target (rule2,ans2) prs
| debugIsOn = let pp_rule rule = sdocWithPprDebug $ \dbg -> if dbg
then ppr rule
- else doubleQuotes (ftext (ru_name rule))
+ else doubleQuotes (ftext (ruleName rule))
in pprTrace "Rules.findBest: rule overlap (Rule 1 wins)"
(vcat [ sdocWithPprDebug $ \dbg -> if dbg
then text "Expression to match:" <+> ppr fn