Note [No eta-expansion in runRW#]
When we see `runRW# (\s. blah)` we must not attempt to eta-expand that lambda. Why not? Because * `blah` can mention join points bound outside the runRW# * eta-expansion uses arityType, and * `arityType` cannot cope with free join Ids: So the simplifier spots the literal lambda, and simplifies inside it. It's a very special lambda, because it is the one the OccAnal spots and allows join points bound /outside/ to be called /inside/. See Note [No free join points in arityType] in GHC.Core.Opt.Arity ************************************************************************ * * Rewrite rules * * ************************************************************************
References 1
- No free join points in arityType GHC.Core.Opt.Arity
Referenced by 4
- GHC.Core.Opt.Simplify.Iteration call site ×3
- No free join points in arityType GHC.Core.Opt.Arity