[commit: ghc] master: Eta expansion and join points (25754c8)

git at git.haskell.org git at git.haskell.org
Fri Apr 28 11:04:15 UTC 2017


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/25754c83c9be3bf843310b1c7877c42fa3f9f3c7/ghc

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

commit 25754c83c9be3bf843310b1c7877c42fa3f9f3c7
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Wed Apr 26 16:57:15 2017 +0100

    Eta expansion and join points
    
    CoreArity.etaExpand tried to deal with eta-expanding expressions
    with join points.  For example
        let j x = e in \y. b
    
    But it is hard to eta-expand this in the "no-crap" way described in
    Note [No crap in eta-expanded code], becuase it would mean pushing
    the "apply to y" into the join RHS, and changing its type. And the
    join might be recursive, and it might have an unfolding.
    
    Moreover in elaborate cases like this I don't think we need the
    no-crap thing.  So for now I'm simplifying the code by generating
       \z. (let j x = e in \y. b) z
    
    Let's see if that gives rise to any problems.
    See Note [Eta expansion for join points]


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

25754c83c9be3bf843310b1c7877c42fa3f9f3c7
 compiler/coreSyn/CoreArity.hs | 139 +++++++++++++-----------------------------
 1 file changed, 43 insertions(+), 96 deletions(-)

Diff suppressed because of size. To see it, use:

    git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 25754c83c9be3bf843310b1c7877c42fa3f9f3c7


More information about the ghc-commits mailing list