I don't know that I can give an example, because I'm using the GHC API indirectly, via HERMIT. Andrew Farmer noticed that the dictionary accessors have special rules rather than unfoldings, and he was able to extend HERMIT to do the equivalent of applying those rules. It's working fine, and the supporting HERMIT code is reasonably simple.

Cheers,
- Conal

On Wed, Jan 6, 2016 at 1:25 AM, Simon Peyton Jones <simonpj@microsoft.com> wrote:

Quite possibly.  Maybe you can give a tiny concrete example?

 

From: ghc-devs [mailto:ghc-devs-bounces@haskell.org] On Behalf Of Conal Elliott
Sent: 06 January 2016 05:38
To: ghc-devs@haskell.org
Subject: Inlining of methods (dictionary accessors) in GHC 7.10?

 

Did something about change with method inlining between GHC 7.8.2 and 7.10.3? I don't mean methods attached to instances, but rather the method name itself, which I understand is defined as simple field accessors into a dictionary. I do inlining indirectly via HERMIT, and the method names are no longer successfully inlining to the accessors. The dictionaries themselves inline fine, as do field accessors for algebraic types with named fields.

-- Conal