WIP: TidyPgm: Fix inconsistency with CorePrep
This fixes two inconsistencies between the CAFfy-ness logic in TidyPgm and CorePrep:
-
As discussed in Note [Floating unlifted arguments], CorePrep let-binds unlifted arguments.
-
As discussed in Note [Floating Ticks in CorePrep], we sometimes float ticks during ANF-isation.
In both cases this floating can turn static constructor applications into dynamically-allocating thunks and can consequently affect CAFfy-ness. The former was the cause of #16846 (closed).
This is all described in a new Note, Note [Functions applied to unlifted arguments are CAFfy].