Skip to content

CorePrep: Eta expand arguments (#23083)

Sebastian Graf requested to merge wip/T23083 into master

Previously, we'd only eta expand let bindings and lambdas, now we'll also eta expand arguments such as in T23083:

g f h = f (h `seq` (h $))

Unless -fpedantic-bottoms is set, we'll now transform to

g f h = f (\eta -> h eta)

in CorePrep.

See the new Note [Eta expansion of arguments in CorePrep] for the details.

Fixes #23083 (closed).

Edited by Sebastian Graf

Merge request reports