PrelRules: Ensure that string unpack/append rule fires with source notes
Previously the presence of source notes could hide nested applications
of unpackFoldrCString#
from our constant folding logic. For instance,
consider the expression:
unpackFoldrCString# "foo" c (unpackFoldrCString# "baz" c n)
Specifically, ticks appearing in two places can defeat the rule:
- Surrounding the inner application of
unpackFoldrCString#
- Surrounding the fold function,
c
The latter caused the str_rules
testcase to fail when base
was built
with -g3
.
Fixes #16740 (closed).