I dug into this some more. My first problem was a stupid mistake: matching on Data.Foldable.foldr instead of GHC.List.foldr. That makes the write-back rule work when there's no fusion at all. However, if there's partial fusion with augment, then I actually get a problem from a failure to inline. That inlining failure strikes me as somewhat surprising. The function involved is actually a *partial application* of a one-shot function. I don't see how we could ever win much by not inlining it. I'll provide further details soon.
-------- Original message --------
From: David Feuer <david@well-typed.com>
Date: 3/27/18 11:28 PM (GMT+01:00)
To: Simon Peyton Jones <simonpj@microsoft.com>
Cc: ghc-devs@haskell.org
Subject: Re: Missed beta reductions
On Tuesday, March 27, 2018 7:55:02 AM EDT Simon Peyton Jones wrote: