<div dir="ltr"><div><div><div>Hah! I had misread the signatures in the Core output. I'm getting exactly the dictionary removal I wanted. Fantastic!<br><br></div>I'm attaching my sample source code and the Core it produces.<br><br></div>Sorry for the misdirection, and kudos for specialis/zation in GHC!<br><br></div>-- Conal<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 28, 2016 at 4:54 AM, Simon Peyton Jones <span dir="ltr"><<a href="mailto:simonpj@microsoft.com" target="_blank">simonpj@microsoft.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div link="#0563C1" vlink="#954F72" lang="EN-GB">
<div>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif">Aggressive inlining is one way, but specialisation ought to get a long way, and makes fewer copies of the specialised code.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif">It’s hard to help without a concrete example<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif">Simon<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-family:"Calibri",sans-serif"><u></u> <u></u></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif" lang="EN-US">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif" lang="EN-US"> ghc-devs [mailto:<a href="mailto:ghc-devs-bounces@haskell.org" target="_blank">ghc-devs-bounces@haskell.org</a>]
<b>On Behalf Of </b>Conal Elliott<br>
<b>Sent:</b> 28 January 2016 00:05<br>
<b>To:</b> <a href="mailto:ghc-devs@haskell.org" target="_blank">ghc-devs@haskell.org</a><br>
<b>Subject:</b> More aggressive dictionary removal?<u></u><u></u></span></p>
</div>
</div><span class="">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal" style="margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm">
I'm looking for pointers on getting GHC to eliminate more overloading & polymorphism. I think this sort of thing mainly happens in the Specialise module. The default GHC flag settings get me a couple levels of monomorphization and dictionary removal, but I
 want to go further. I've tried -fspecialise-aggressively, but it didn't seem to make a difference, and I haven't found this flag described in the GHC user's guide. Anyone have pointers to more information?<u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-right:0cm;margin-bottom:6.0pt;margin-left:0cm">
Thanks, - Conal<u></u><u></u></p>
</div>
</span></div>
</div>
</div>

</blockquote></div><br></div>