diff options
author | Sebastian Graf <sebastian.graf@kit.edu> | 2021-05-14 12:24:48 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-05-19 23:37:44 -0400 |
commit | e87b8e108303634af8a7247037d50ab10456c189 (patch) | |
tree | 5a04dd51a99d6b08fead5ebc01b70cc213d57dc2 /testsuite/tests/stranal | |
parent | 6844ead4f45620f0e9573762e9a892d1ae1609f4 (diff) | |
download | haskell-e87b8e108303634af8a7247037d50ab10456c189.tar.gz |
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
Diffstat (limited to 'testsuite/tests/stranal')
-rw-r--r-- | testsuite/tests/stranal/sigs/T18086.stderr | 2 |
1 files changed, 1 insertions, 1 deletions
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: <L>x ==================== Cpr signatures ==================== T18086.$trModule: T18086.m: b -T18086.panic: +T18086.panic: b |