Skip to content

Fix #22425 - Broken eta expansion over expensive work in 9.4

Andreas Klebinger requested to merge wip/andreask/94-dlist into ghc-9.4
Through a mistake in the latest backport we started eta-expanding over
expensive work by mistake. E.g. over <expensive> in code like:

  case x of
    A -> id
    B -> <expensive>

We fix this by only eta-expanding over <expensive> if all other branches
are headed by an oneShot lambda.

Merge request reports