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

ÉRDI Gergő gergo at erdi.hu
Fri Apr 1 08:04:54 UTC 2022


Hi,

I'm CC-ing the Clash mailing list because I believe they should have 
encountered the same problem (and perhaps have found a solution to it 
already!).

I'm trying to use `.hi` files compiled with `ExposeAllUnfoldings` set to 
reconstruct full Core bindings for further processing. By and large, this 
works, but I get tripped up on identifiers whose unfolding is only given 
as `OtherCon []`. It is unclear to me what is causing this -- some of them 
are recursive bindings while others are not.

The problem, of course, is that if all I know about an identifier is that 
it is `OtherCon []`, that doesn't allow me to restore its definition. So 
is there a way to tell GHC to put "full" unfoldings everywhere in 
`ExposeAllUnfoldings` mode?

Thanks,
 	Gergo


More information about the ghc-devs mailing list