<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body>
<p>I'm sorry, I misunderstood the paper and thought the depth of the
instantiation and subsumption could be varied more independently.<br>
</p>
<p>That said, what about the seq example below? Does forcing any
function that is eta expanded like that sketchy to you? There is
still a runtime cost to the eta expansion, but think with more
elbow grease that could also be addressed (post-type-erasure
optimization or new coercions).</p>
<p>John<br>
</p>
<div class="moz-cite-prefix">On 6/18/21 3:56 PM, Simon Peyton Jones
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:HE1PR83MB0361FE9727C4D04C88115B4CAD0D9@HE1PR83MB0361.EURPRD83.prod.outlook.com">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered
medium)">
<style>@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}span.EmailStyle21
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}div.WordSection1
{page:WordSection1;}</style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Richard’s
paper argues for lazy rather than eager instantiation.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">It
does <b>not</b> argue for deep rather than shallow
subsumption and instantiation; on the contrary, it argues
for shallow. (That is, for “simple subsumption”.) And it
is simple subsumption that is the focus of this
conversation. <o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Simon<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></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 lang="EN-US">From:</span></b><span
lang="EN-US"> John Ericson
<a class="moz-txt-link-rfc2396E" href="mailto:john.ericson@obsidian.systems"><john.ericson@obsidian.systems></a>
<br>
<b>Sent:</b> 18 June 2021 16:56<br>
<b>To:</b> ghc-devs <a class="moz-txt-link-rfc2396E" href="mailto:ghc-devs@haskell.org"><ghc-devs@haskell.org></a><br>
<b>Cc:</b> Simon Peyton Jones
<a class="moz-txt-link-rfc2396E" href="mailto:simonpj@microsoft.com"><simonpj@microsoft.com></a><br>
<b>Subject:</b> Re: Is simplified subsumption really
necessary?<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p>On 6/16/21 12:00 PM, Simon Peyton Jones via ghc-devs wrote:<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"> I’m sorry to hear that Chris. It’s
exactly backwards from what I would expect – the typing
rules with simple subsumption are, well, simpler than
those for complicated subsumption, and so one might hope
that your intuition had fewer complexities to grapple
with. <o:p></o:p></p>
</blockquote>
<p>In <a
href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fricharde.dev%2Fpapers%2F2021%2Fstability%2Fstability.pdf&data=04%7C01%7Csimonpj%40microsoft.com%7C7655b09d06a54a4af03508d9327193cd%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637596286139778988%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=R1quXKjsnEjusvX%2BSxhPT25t%2B%2Bwqwo7mTPhnulvctQ0%3D&reserved=0"
moz-do-not-send="true">
https://richarde.dev/papers/2021/stability/stability.pdf</a>
it is written<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p><span
style="font-size:12.5pt;font-family:"Arial",sans-serif">The
analysis around stability in this paper strongly
suggests that GHC should use the lazy, shallow approach
to instantiation. Yet the struggles with lazy
instantiation above remain. In order to simplify the
implementation, GHC has recently (for GHC 9.0) switched
to use exclusively eager instantiation.This choice
sacrifices stability for convenience in implementation.</span><o:p></o:p></p>
</blockquote>
<p>I think the principles outlined in the paper are very good,
and explain the queasiness some users may feel in 9.0<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt">But wouldn't
it be possible to choose a desugaring with seq that
doesn't do so?<o:p></o:p></p>
<p class="MsoNormal"><span
style="mso-fareast-language:EN-US"> </span><o:p></o:p></p>
<p class="MsoNormal"><span
style="mso-fareast-language:EN-US">I just don’t know how
to do that. Maybe someone else does.
</span><o:p></o:p></p>
</blockquote>
<p>Is it not<o:p></o:p></p>
<p> f `seq` \x -> f x<o:p></o:p></p>
<p>and similar? I haven't thought about the issue in a while
or in very much depth, but when I first discussed the
proposal years back with some other people at work, they
spit-balled the same counter-proposal.<o:p></o:p></p>
<p>----<o:p></o:p></p>
<p>Having little "skin in the game" as I haven't yet ported
any serious programs over to 9.0, I suppose I am glad the
experimentation with QuickLook is happening, and OK that our
accepting on-par fewer programs now opens design space for
later (i.e. we got the breakage out of the way.) But I
certainly think there are improvements in the spirit
outlined in Richard's paper to be done down the road.<o:p></o:p></p>
<p>John<o:p></o:p></p>
</div>
</div>
</blockquote>
</body>
</html>