Skip to content

CPR: Detect constructed products in `runRW#` apps (#19822)

Sebastian Graf requested to merge wip/T19822 into master

In #19822 (closed), we realised that the Simplifier's new habit of floating cases into runRW# continuations inhibits CPR analysis from giving key functions of text the CPR property, such as singleton.

This patch fixes that by anticipating part of !5667 (closed) (Nested CPR) to give runRW# the proper CPR transformer it now deserves: Namely, runRW# (\s -> e) should have the CPR property iff e has it.

The details are in Note [Simplification of runRW#] in GHC.CoreToStg.Prep.

Fixes #19822 (closed).

Merge request reports