<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">I&#39;m not sure why you don&#39;t just use curry directly here. Also, why not just implement toAscList like in the rule and INLINE it?</div>

</blockquote><div>I concede that using curry directly is the better approach, but when I implement toAscList as in the rule and inline it, it doesn&#39;t actually appear to get inlined.  (Example: mapKeysWith, which is defined as fromListWith c . List.map fFirst . toList, doesn&#39;t actually fold/build with the map.)</div>

<div><br></div><div>Revised, complete patch: <a href="http://hackage.haskell.org/trac/ghc/attachment/ticket/3999/fold-building.patch">http://hackage.haskell.org/trac/ghc/attachment/ticket/3999/fold-building.patch</a></div>

</div>