Skip to content
  • Simon Peyton Jones's avatar
    Eta expansion and join points · 25754c83
    Simon Peyton Jones authored
    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]
    25754c83