Closed zliu41 closed 7 months ago
The “may” in the description has caused me to ignore this PR for a while. Do we have evidence that this actually works? If not, this should probably move to draft status until we can test it (perhaps ideally by adding golden tests – although those are very GHC-version-dependent, which is a pain).
I'm not even sure whether or not
v's OccInfo is always ManyOccs
is still the case. When we had the presimplifier
, it is possible that GHC performs occurrence analysis before the presimplifier
, and the presimplifier
somehow messes things up. Now presimplifier
is gone, and we need to double check whether the problem still exists. I'll just close the PR.
The reason that in the
Plugins.Let
case,v
'sOccInfo
is alwaysManyOccs
(#22), may be that the occurrence analysis simply isn't run before the plugin, for whatever reason (-O0
?). If so, we can simply run it ourselves.