<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body><div>Hmmm. So you think maybe it's doing something like (roughly; I don't have the exact case in front of me)</div><div><br></div><div>(\p q -> f p (g p q)) this that</div><div><br></div><div>==> beta reduce</div><div><br></div><div>let</div><div> p = this</div><div> q = that</div><div>in f p (g p q)</div><div><br></div><div>==> inline q</div><div><br></div><div>let</div><div> p = this</div><div>in f p (g p that)</div><div>?</div><div><br></div><div>I tried marking the "this" in question INLINE CONLIKE [0]. Shouldn't that tell GHC that duplicating it is fine? I really want to see it for RULES.</div><div><br></div><div><br></div><div id="composer_signature"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><div style="font-size:85%;color:#575757">David Feuer</div><div style="font-size:85%;color:#575757">Well-Typed, LLP</div></div><div><br></div><div style="font-size:100%;color:#000000"><!-- originalMessage --><div>-------- Original message --------</div><div>From: Simon Peyton Jones <simonpj@microsoft.com> </div><div>Date: 3/26/18 7:14 PM (GMT-05:00) </div><div>To: David Feuer <david@well-typed.com>, ghc-devs@haskell.org </div><div>Subject: RE: Missed beta reductions </div><div><br></div></div>GHC always beta-reduces.<br><br>It does not always inline. For that: -ddump-inlinings<br><br>Simon<br><br>From: ghc-devs <ghc-devs-bounces@haskell.org> On Behalf Of David Feuer<br>Sent: 26 March 2018 23:59<br>To: ghc-devs@haskell.org<br>Subject: Missed beta reductions<br><br>What's the best way to find spots where GHC saw a redex and choose not to beta reduce? Is there a flag for that? It could be useful when trying to figure out why rules aren't firing.<br><br><br>David Feuer<br>Well-Typed, LLP<br></body></html>