<div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif">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 <br></div><div class="gmail_default" style="font-family:tahoma,sans-serif"> data T = MkT !a !a</div><div class="gmail_default" style="font-family:tahoma,sans-serif"> f (MkT x y) = ...</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">here x and y have OtherCon [] unfoldings. They are definitely not bottom!<br></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">You may want stronger invariants on the output of CorePrep than we have hitherto sought. Can you explain what they are? And why you want the output of CorePrep not CoreTidy?</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">Thanks</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">Simon<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 1 Apr 2022 at 09:13, ÉRDI Gergő <<a href="mailto:gergo@erdi.hu">gergo@erdi.hu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
I'm CC-ing the Clash mailing list because I believe they should have <br>
encountered the same problem (and perhaps have found a solution to it <br>
already!).<br>
<br>
I'm trying to use `.hi` files compiled with `ExposeAllUnfoldings` set to <br>
reconstruct full Core bindings for further processing. By and large, this <br>
works, but I get tripped up on identifiers whose unfolding is only given <br>
as `OtherCon []`. It is unclear to me what is causing this -- some of them <br>
are recursive bindings while others are not.<br>
<br>
The problem, of course, is that if all I know about an identifier is that <br>
it is `OtherCon []`, that doesn't allow me to restore its definition. So <br>
is there a way to tell GHC to put "full" unfoldings everywhere in <br>
`ExposeAllUnfoldings` mode?<br>
<br>
Thanks,<br>
Gergo<br>
_______________________________________________<br>
ghc-devs mailing list<br>
<a href="mailto:ghc-devs@haskell.org" target="_blank">ghc-devs@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs</a><br>
</blockquote></div>