Simon Peyton Jones pushed to branch wip/T20264 at Glasgow Haskell Compiler / GHC

Commits:

1 changed file:

Changes:

  • compiler/GHC/Core/Utils.hs
    ... ... @@ -3133,8 +3133,8 @@ So:
    3133 3133
     * When we make an AbsVars list, we close over the free vars of the unfoldings
    
    3134 3134
       of any tyvars in it.  So if `b{=Maybe a}` is in the list then so is `a`
    
    3135 3135
     
    
    3136
    -* `mkCoreAbsLams` forms a lambda abstraction pushing the tyvar bindings
    
    3137
    -  into the body:
    
    3136
    +* `mkCoreAbsLams` (more generally `mkPolyAbsLams`) forms a lambda abstraction pushing
    
    3137
    +   the tyvar bindings into the body:
    
    3138 3138
           mkCoreAbsLams [a, b=[a], x:b] body
    
    3139 3139
              = \a. \(x:[a]). let @b = [a] in body
    
    3140 3140
     
    
    ... ... @@ -3175,9 +3175,9 @@ mkPolyAbsLams (getter,setter) bndrs body
    3175 3175
           = Lam (setter var1 bndr) (go unf_tvs binds' bndrs)
    
    3176 3176
     
    
    3177 3177
           | isId var, change_ty || change_unf
    
    3178
    -      , let binds' | isDeadBinder var = binds
    
    3179
    -                   | otherwise        = NonRec bndr (Var id2) : binds
    
    3180
    -      = Lam (setter id2 bndr) (go unf_tvs binds' bndrs)
    
    3178
    +--      , let binds' | isDeadBinder var = binds
    
    3179
    +--                   | otherwise        = NonRec bndr (Var id2) : binds
    
    3180
    +      = Lam (setter id2 bndr) (go unf_tvs binds bndrs)
    
    3181 3181
     
    
    3182 3182
           | otherwise
    
    3183 3183
           = Lam bndr  (go unf_tvs binds bndrs)