Avoiding `OtherCon ` unfoldings, restoring definitions from unfoldings
ben at smart-cactus.org
Tue Apr 5 13:53:02 UTC 2022
Simon Peyton Jones <simon.peytonjones at gmail.com> writes:
> I don't think any top-level Ids should have OtherCon  unfoldings? If
> they do, can you give a repro case? OtherCon  unfoldings usually mean "I
> know this variable is evaluated, but I don't know what its value is. E.g
> data T = MkT !a !a
> f (MkT x y) = ...
> here x and y have OtherCon  unfoldings. They are definitely not bottom!
Is there a reason why we wouldn't potentially give a static data
constructor application an OtherCon  unfolding? I would guess that
usually these are small enough to have a CoreUnfolding, but in cases
where the expression is too large to have an unstable unfolding we might
rather want to give it an OtherCon .
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 487 bytes
Desc: not available
More information about the ghc-devs