workerInfo, setWorkerInfo, ppWorkerInfo,
-- Unfolding
- unfoldingInfo, setUnfoldingInfo,
+ unfoldingInfo, setUnfoldingInfo, setUnfoldingInfoLazily,
#ifdef OLD_STRICTNESS
-- Old DemandInfo and StrictnessInfo
#endif
-- Try to avoid spack leaks by seq'ing
-setUnfoldingInfo info uf
+setUnfoldingInfoLazily info uf -- Lazy variant to avoid looking at the
+ = -- unfolding of an imported Id unless necessary
+ info { unfoldingInfo = uf } -- (In this case the demand-zapping is redundant.)
+
+setUnfoldingInfo info uf
| isEvaldUnfolding uf
-- If the unfolding is a value, the demand info may
-- go pear-shaped, so we nuke it. Example: