[commit: ghc] wip/T14068: In scTopBind NonRec, do not forget the usage from the rhs_info (0f1fee6)
git at git.haskell.org
git at git.haskell.org
Mon Mar 19 20:54:43 UTC 2018
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/T14068
Link : http://ghc.haskell.org/trac/ghc/changeset/0f1fee6be3df20837543ede7223a827abb6a4759/ghc
>---------------------------------------------------------------
commit 0f1fee6be3df20837543ede7223a827abb6a4759
Author: Joachim Breitner <mail at joachim-breitner.de>
Date: Mon Mar 19 16:54:06 2018 -0400
In scTopBind NonRec, do not forget the usage from the rhs_info
not that I know what I am doing here, but this seems to work “better”
>---------------------------------------------------------------
0f1fee6be3df20837543ede7223a827abb6a4759
compiler/specialise/SpecConstr.hs | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/compiler/specialise/SpecConstr.hs b/compiler/specialise/SpecConstr.hs
index 9549b3c..efd56ce 100644
--- a/compiler/specialise/SpecConstr.hs
+++ b/compiler/specialise/SpecConstr.hs
@@ -1433,9 +1433,12 @@ scTopBind env body_usage (NonRec bndr rhs)
; (spec_usg, specs) <- specNonRec env body_usage rhs_info
+ ; let usage' = body_usage `combineUsage` spec_usg `combineUsage` ri_rhs_usg rhs_info
+
; let binds' = [NonRec b r | (b,r) <- ruleInfoBinds rhs_info specs]
- ; return (body_usage `combineUsage` spec_usg, binds')
+
+ ; return (usage', binds')
}
More information about the ghc-commits
mailing list