From e87b8e108303634af8a7247037d50ab10456c189 Mon Sep 17 00:00:00 2001 From: Sebastian Graf Date: Fri, 14 May 2021 12:24:48 +0200 Subject: CPR: Detect constructed products in `runRW#` apps (#19822) In #19822, 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 (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. The output of T18086 changed a bit: `panic` (which calls `runRW#`) now has `botCpr`. As outlined in Note [Bottom CPR iff Dead-Ending Divergence], that's OK. Fixes #19822. Metric Decrease: T9872d --- testsuite/tests/stranal/sigs/T18086.stderr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'testsuite/tests/stranal') diff --git a/testsuite/tests/stranal/sigs/T18086.stderr b/testsuite/tests/stranal/sigs/T18086.stderr index 43266ad0da..1748a0c145 100644 --- a/testsuite/tests/stranal/sigs/T18086.stderr +++ b/testsuite/tests/stranal/sigs/T18086.stderr @@ -9,7 +9,7 @@ T18086.panic: x ==================== Cpr signatures ==================== T18086.$trModule: T18086.m: b -T18086.panic: +T18086.panic: b -- cgit v1.2.1