PrelRules: Ensure that string unpack/append rule fires with source notes

Authored by bgamari on Jun 3 2019, 11:42 PM.

Description

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:

haskell
unpackFoldrCString# "foo" c (unpackFoldrCString# "baz" c n)

Specifically, ticks appearing in two places can defeat the rule:

a. Surrounding the inner application of `unpackFoldrCString#`
b. Surrounding the fold function, `c`

The latter caused the str_rules testcase to fail when base was built
with -g3.

Fixes Trac #16740.

Details

Committed
Marge Bot <ben+marge-bot@smart-cactus.org>Jun 13 2019, 1:49 AM
Parents
rGHCfc6b23be509e: Fix #16525: ObjectCode freed wrongly because of lack of info header check
Branches
Unknown
Tags
Unknown