PUBLIC
Hi,
The attached program uses the GHC 9.0.1 API to typecheck and compile a single module that contains a single definition marked as INLINE:
module Inline where
data A = A1 | A2
data B = B1 | B2
{-# INLINE f #-}
f :: A ->B
f A1 = B1
f A2 = B2
In my bigger program, I noticed that usages of `f` in another module aren’t inlined, so I made the attached experiment: I compile this to desugared, simplified, tidied and prep’d
Core, and then use updateModDetailsIdInfos to fill in the unfolding of `f`. At least, that’s what I thought I do. However, if I print the unfolding of `f` after this process, I get `OtherCon []` instead of what I expected to be a CoreUnfolding. What am I doing
wrong?
Thanks,
Gergo