Ah, I misread that TidyPgm function.It looks like if I build the CoreUnfolding, GHC will respect it. It's just rejecting the pragma combination in HsSyn.
On Jul 16, 2013 3:22 PM, "Nicolas Frisby" <nicolas.frisby@gmail.com> wrote:
>
> I'd like to put a NOINLINE and an INLINABLE pragma on a binding.
>
> (I'm sketching a defunctionalization pass. I'd like the 'apply` routine RHS to make it into the interface file, but I do not want it to be inlined, since that'd undo the defunctionalization.)
>
> In other words, I'd like a CoreUnfolding value with the uf_guidance = UnfNever.
>
> It seems TidyPgm.addExternal ignores such a core unfolding.
>
> Would GHC consider a patch to make this work?
>
> Thanks.