Note [Which RHSs do we eta-expand?]

GHC/Core/Opt/Simplify/Utils.hs:1991 compiler

We don't eta-expand:

* Trivial RHSs, e.g.     f = g
  If we eta expand do
    f = \x. g x
  we'll just eta-reduce again, and so on; so the
  simplifier never terminates.

* PAPs: see Note [Do not eta-expand PAPs]

What about things like this?
   f = case y of p -> \x -> blah

Here we do eta-expand.  This is a change (Jun 20), but if we have
really decided that f has arity 1, then putting that lambda at the top
seems like a Good idea.

References 1

Referenced by 2