[commit: ghc] wip/12368: Dmd Anal: Fix refactoring fallout (7ed1d0e)

git at git.haskell.org git at git.haskell.org
Mon Aug 1 01:00:12 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/12368
Link       : http://ghc.haskell.org/trac/ghc/changeset/7ed1d0e2c557e932a209f586593a8ef987ccdb34/ghc

>---------------------------------------------------------------

commit 7ed1d0e2c557e932a209f586593a8ef987ccdb34
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Sun Jul 31 20:04:54 2016 -0400

    Dmd Anal: Fix refactoring fallout
    
    This one-character typo (id instead of id1) was really hard to track
    down :-(. Lets see if this finally works now.


>---------------------------------------------------------------

7ed1d0e2c557e932a209f586593a8ef987ccdb34
 compiler/stranal/DmdAnal.hs | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/compiler/stranal/DmdAnal.hs b/compiler/stranal/DmdAnal.hs
index 22e1faa..7fdd58c 100644
--- a/compiler/stranal/DmdAnal.hs
+++ b/compiler/stranal/DmdAnal.hs
@@ -284,7 +284,8 @@ dmdAnal' env dmd (Let (NonRec id rhs) body)
   = (body_ty2, Let (NonRec id2 rhs') body')
   where
     (lazy_fv, id1, rhs') = dmdAnalRhsLetDown NotTopLevel Nothing env id rhs
-    (body_ty, body')     = dmdAnal (extendAnalEnv NotTopLevel env id (idStrictness id)) dmd body
+    env1                 = extendAnalEnv NotTopLevel env id1 (idStrictness id1)
+    (body_ty, body')     = dmdAnal env1 dmd body
     (body_ty1, id2)      = annotateBndr env body_ty id1
     body_ty2             = addLazyFVs body_ty1 lazy_fv -- see Note [Lazy and unleasheable free variables]
 



More information about the ghc-commits mailing list