<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto">Indeed.<br><br><div dir="ltr">Sent from my iPhone</div><div dir="ltr"><br><blockquote type="cite">On Apr 26, 2021, at 2:22 PM, Simon Peyton Jones <simonpj@microsoft.com> wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr">

<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@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;}
/* Style Definitions */
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.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
.MsoPapDefault
        {mso-style-type:export-only;
        margin-top:6.0pt;
        margin-right:0cm;
        margin-bottom:6.0pt;
        margin-left:0cm;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.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">You mean you like ‘withDict’ with that name,  as well as the argument order K suggests?   i.e. not reifyDict?<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"> Edward Kmett <ekmett@gmail.com>
<br>
<b>Sent:</b> 26 April 2021 21:34<br>
<b>To:</b> Simon Peyton Jones <simonpj@microsoft.com><br>
<b>Cc:</b> Krzysztof Gogolewski <krz.gogolewski@gmail.com>; Spiwack, Arnaud <arnaud.spiwack@tweag.io>; GHC developers <ghc-devs@haskell.org>; Ryan Scott <ryan.gl.scott@gmail.com><br>
<b>Subject:</b> Re: magicDict<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:6.0pt;margin-right:0cm;margin-bottom:6.0pt;margin-left:0cm">
I like withDict a lot. It is direct, easy to chain/use, avoids fighting about direction completely, and even matches the argument order used by reify in the reflection library.<o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:6.0pt;margin-right:0cm;margin-bottom:6.0pt;margin-left:0cm">
<o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:6.0pt;margin-right:0cm;margin-bottom:6.0pt;margin-left:0cm">
+1 from me.<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:6.0pt;margin-right:0cm;margin-bottom:6.0pt;margin-left:0cm">
<o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:6.0pt;margin-right:0cm;margin-bottom:6.0pt;margin-left:0cm">
On Mon, Apr 26, 2021 at 7:49 AM Simon Peyton Jones <<a href="mailto:simonpj@microsoft.com">simonpj@microsoft.com</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<p class="MsoNormal" style="mso-margin-top-alt:6.0pt;margin-right:0cm;margin-bottom:6.0pt;margin-left:0cm">
|  I would like to propose one more option:<br>
|  <br>
|  withDict :: dt -> (ct => a) -> a<br>
<br>
Ah, you mean simply: swap the argument order.   I can see your logic about chaining etc.  I'd be fine with this.<br>
<br>
Simon<br>
<br>
|  -----Original Message-----<br>
|  From: Krzysztof Gogolewski <<a href="mailto:krz.gogolewski@gmail.com" target="_blank">krz.gogolewski@gmail.com</a>><br>
|  Sent: 26 April 2021 15:35<br>
|  To: Simon Peyton Jones <<a href="mailto:simonpj@microsoft.com" target="_blank">simonpj@microsoft.com</a>><br>
|  Cc: Spiwack, Arnaud <<a href="mailto:arnaud.spiwack@tweag.io" target="_blank">arnaud.spiwack@tweag.io</a>>; Edward Kmett<br>
|  <<a href="mailto:ekmett@gmail.com" target="_blank">ekmett@gmail.com</a>>; GHC developers <<a href="mailto:ghc-devs@haskell.org" target="_blank">ghc-devs@haskell.org</a>><br>
|  Subject: Re: magicDict<br>
|  <br>
|  I would like to propose one more option:<br>
|  <br>
|  withDict :: dt -> (ct => a) -> a<br>
|  <br>
|  1. This is less symmetric than '(ct => a) -> dt -> a'<br>
|     but in existing applications magicDict gets the arguments<br>
|     in the reverse order.<br>
|  2. Easier to chain 'withDict d1 (withDict d2 ...)'.<br>
|  3. The name is similar to 'withTypeable' or 'withFile',<br>
|     and avoids arguing which is reify or reflect.<br>
|  <br>
|  On Mon, Apr 26, 2021 at 9:41 AM Simon Peyton Jones via ghc-devs <ghc-<br>
|  <a href="mailto:devs@haskell.org" target="_blank">devs@haskell.org</a>> wrote:<br>
|  ><br>
|  > Can we just agree a name, then?   Please correct me if I'm wrong,<br>
|  but<br>
|  ><br>
|  > I think Ed prefers 'reifyDict',<br>
|  > That is compatible with the existing reflection library Arnaud<br>
|  > disagrees but isn't going to die in the trenches for this one<br>
|  > Virtually anything is better than 'magicDict'.<br>
|  ><br>
|  ><br>
|  ><br>
|  ><br>
|  ><br>
|  > So: reifyDict it is?<br>
|  ><br>
|  ><br>
|  ><br>
|  > Simon<br>
|  ><br>
|  ><br>
|  ><br>
|  > From: Spiwack, Arnaud <<a href="mailto:arnaud.spiwack@tweag.io" target="_blank">arnaud.spiwack@tweag.io</a>><br>
|  > Sent: 26 April 2021 08:10<br>
|  > To: Edward Kmett <<a href="mailto:ekmett@gmail.com" target="_blank">ekmett@gmail.com</a>><br>
|  > Cc: Simon Peyton Jones <<a href="mailto:simonpj@microsoft.com" target="_blank">simonpj@microsoft.com</a>>; GHC developers<br>
|  > <<a href="mailto:ghc-devs@haskell.org" target="_blank">ghc-devs@haskell.org</a>><br>
|  > Subject: Re: magicDict<br>
|  ><br>
|  ><br>
|  ><br>
|  ><br>
|  ><br>
|  ><br>
|  ><br>
|  > On Sun, Apr 25, 2021 at 2:20 AM Edward Kmett <<a href="mailto:ekmett@gmail.com" target="_blank">ekmett@gmail.com</a>><br>
|  wrote:<br>
|  ><br>
|  > I speak to much this same point in this old stack overflow response,<br>
|  though to exactly the opposite conclusion, and to exactly the opposite<br>
|  pet peeve.<br>
|  ><br>
|  ><br>
|  ><br>
|  ><br>
|  <a href="https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstac" target="_blank">
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstac</a><br>
|  ><br>
|  <a href="https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fkoverflow.com%2F&data=04%7C01%7Csimonpj%40microsoft.com%7Cbc489a190b534d771e8e08d908f2a2d4%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637550660487039029%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=p1oBeQtmxDH%2BRx%2FDNmIGeshz8PA0BEdiAcOk1faB0xc%3D&reserved=0" target="_blank">
koverflow.com</a>%2Fa%2F5316014%2F34707&amp;data=04%7C01%7Csimonpj%40micro<br>
|  ><br>
|  <a href="https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fsoft.com%2F&data=04%7C01%7Csimonpj%40microsoft.com%7Cbc489a190b534d771e8e08d908f2a2d4%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637550660487049021%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=N6k7M4FOB19jwAJVlx0y5WOxLwv7VUf58iihdwz2mhQ%3D&reserved=0" target="_blank">
soft.com</a>%7C87da21fdcc8e4ed6bef508d908c071fb%7C72f988bf86f141af91ab2d7c<br>
|  ><br>
|  d011db47%7C1%7C0%7C637550444930791696%7CUnknown%7CTWFpbGZsb3d8eyJWIjoi<br>
|  ><br>
|  MC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;<br>
|  ><br>
|  sdata=VlRrIEROGj%2BE6%2FuLXBEdfa%2BPWVlHh50dahgjIrw4tQU%3D&amp;reserve<br>
|  > d=0<br>
|  ><br>
|  ><br>
|  ><br>
|  > :-)<br>
|  ><br>
|  ><br>
|  ><br>
|  > I do not feel that I chose the vocabulary without due consideration<br>
|  of the precise meaning of the words used.<br>
|  ><br>
|  ><br>
|  ><br>
|  > I didn't mean to imply that you did. Sorry if I did so: written<br>
|  communication is hard. For what it's worth, I didn't really think that<br>
|  I would change your mind, either.<br>
|  ><br>
|  ><br>
|  ><br>
|  > Though it still seems to me that the name `ReifiedMonoid` uses the<br>
|  word for a different thing than the `reifyMonoid` function does.<br>
|  ><br>
|  ><br>
|  ><br>
|  > To be explicit:<br>
|  ><br>
|  ><br>
|  ><br>
|  > Viewing a type as a space, 'reify' in the reflection library takes<br>
|  some space 'a' and splits it into individual fibers for each term in<br>
|  'a', finding the appropriate one and handing it back to you as a fresh<br>
|  type 's' that captures just that singular value. The result is<br>
|  significantly less abstract, as we gained detail on the type, now<br>
|  every point in the original space 'a' is a new space. At the type<br>
|  level the fresh 's' in s `Reifies` a now concretely names exactly one<br>
|  inhabitant of 'a'.<br>
|  ><br>
|  ><br>
|  ><br>
|  > On the flip side, 'reflect' in the reflection library forgets this<br>
|  finer fibration / structure on space, losing the information about<br>
|  which fiber the answer came from, being forgetful is precisely the<br>
|  justification of it being the 'reflect' half of the reify -| reflect<br>
|  pairing.<br>
|  ><br>
|  ><br>
|  ><br>
|  > I confess I don't necessarily anticipate this changing your mind but<br>
|  it was not chosen blindly, reflect is the forgetful mapping here,<br>
|  reification is free and left adjoint to it, at least in the context of<br>
|  reflection-the-library, where a quantifier is being injected to track<br>
|  the particular member.<br>
|  ><br>
|  ><br>
|  ><br>
|  > I've got to admit that I have the hardest time seeing the `s` as<br>
|  representing an inhabitant of `a`. I'm probably missing something<br>
|  here.<br>
|  ><br>
|  ><br>
|  ><br>
|  > I also don't think that a free object construction embodies a<br>
|  reify/reflect pair completely. It's probably fair to see `reify` as<br>
|  being the natural mapping from the free object of X to X (the counit<br>
|  of the adjunction). But reification will not be the unit of the<br>
|  adjunction, because it's trivial. So there is still a piece missing in<br>
|  this story.<br>
|  ><br>
|  ><br>
|  ><br>
|  > Anyway... I've made my point, and I am not too willing to spend too<br>
|  much time proving Wadler's law correct. So I think I'll stop here,<br>
|  fascinating a conversation though it is.<br>
|  ><br>
|  ><br>
|  ><br>
|  > Best,<br>
|  ><br>
|  > Arnaud<br>
|  ><br>
|  > _______________________________________________<br>
|  > ghc-devs mailing list<br>
|  > <a href="mailto:ghc-devs@haskell.org" target="_blank">ghc-devs@haskell.org</a><br>
|  ><br>
|  <a href="https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmail" target="_blank">
https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmail</a>.<br>
|  > <a href="https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2Fhaskell.org%2F&data=04%7C01%7Csimonpj%40microsoft.com%7Cbc489a190b534d771e8e08d908f2a2d4%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637550660487049021%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=jb06dc8TTuyWU1YLju%2B3QaK7mj6XWYYVj1y%2FCzBJxs8%3D&reserved=0" target="_blank">
haskell.org</a>%2Fcgi-bin%2Fmailman%2Flistinfo%2Fghc-<br>
|  devs&amp;data=04%7C01<br>
|  ><br>
|  %7Csimonpj%<a href="https://nam06.safelinks.protection.outlook.com/?url=http%3A%2F%2F40microsoft.com%2F&data=04%7C01%7Csimonpj%40microsoft.com%7Cbc489a190b534d771e8e08d908f2a2d4%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637550660487059014%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=TKElWjsvplhVB%2B1Y27nnOo7LKLrCgLUcWrYX5ZOSwE0%3D&reserved=0" target="_blank">40microsoft.com</a>%7C87da21fdcc8e4ed6bef508d908c071fb%7C72f988<br>
|  ><br>
|  bf86f141af91ab2d7cd011db47%7C1%7C0%7C637550444930791696%7CUnknown%7CTW<br>
|  ><br>
|  FpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6<br>
|  ><br>
|  Mn0%3D%7C1000&amp;sdata=4JfXyRNMjQKTSLqme2VJU9Dy0s6N4Y8t%2BINHYp38xJk%<br>
|  > 3D&amp;reserved=0<o:p></o:p></p>
</blockquote>
</div>
</div>
</div>


</div></blockquote></body></html>