Avoiding `OtherCon []` unfoldings, restoring definitions from unfoldings

Ben Gamari 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 [].

Cheers,

- Ben

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 487 bytes
Desc: not available
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20220405/8edb4786/attachment.sig>


More information about the ghc-devs mailing list