-
This fixes a regression due to D2605 (see #8472) wherein top-level primitive strings would fail to be noticed by CoreToStg as they were wrapped in a tick. This resulted in a panic in CoreToStg due to inconsistent CAF information (or a Core Lint failure, if enabled). Here we document the invariant that unlifted expressions can only sit at top-level if of the form `Lit (MachStr ...)` with no ticks or other embellishments. Moreover, we fix instance of this in `Simplify.prepareRhs` and `FloatOut.wrapTick` where this invariant was being broken. Test Plan: Validate with `-g`. Run testsuite with `WAY=ghci`. Reviewers: austin, simonpj Reviewed By: simonpj Subscribers: simonpj, akio, scpmw, thomie Differential Revision: https://phabricator.haskell.org/D3051
f5b275a2