<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@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;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0cm;
margin-right:0cm;
margin-bottom:0cm;
margin-left:36.0pt;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
p.Code, li.Code, div.Code
{mso-style-name:Code;
margin-top:0cm;
margin-right:0cm;
margin-bottom:0cm;
margin-left:36.0pt;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
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;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:1595439234;
mso-list-type:hybrid;
mso-list-template-ids:-290188594 134807553 134807555 134807557 134807553 134807555 134807557 134807553 134807555 134807557;}
@list l0:level1
{mso-level-number-format:bullet;
mso-level-text:;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Symbol;}
@list l0:level2
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:"Courier New";}
@list l0:level3
{mso-level-number-format:bullet;
mso-level-text:;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Wingdings;}
@list l0:level4
{mso-level-number-format:bullet;
mso-level-text:;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Symbol;}
@list l0:level5
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:"Courier New";}
@list l0:level6
{mso-level-number-format:bullet;
mso-level-text:;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Wingdings;}
@list l0:level7
{mso-level-number-format:bullet;
mso-level-text:;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Symbol;}
@list l0:level8
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:"Courier New";}
@list l0:level9
{mso-level-number-format:bullet;
mso-level-text:;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-18.0pt;
font-family:Wingdings;}
ol
{margin-bottom:0cm;}
ul
{margin-bottom:0cm;}
--></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]-->
</head>
<body lang="EN-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">If it merges ok, I’d be inclined to put this in.
<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="font-size:11.0pt;font-family:Symbol;mso-fareast-language:EN-US"><span style="mso-list:Ignore">·<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">We know it’ll help someone (Mathieu and colleages).
<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="font-size:11.0pt;font-family:Symbol;mso-fareast-language:EN-US"><span style="mso-list:Ignore">·<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">It (should) affect a new and as-yet little-used feature, so it’s unlikely to harm anyone. (Of course, ANY change can have unexpected
consequences.)<o:p></o:p></span></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l0 level1 lfo1"><![if !supportLists]><span style="font-size:11.0pt;font-family:Symbol;mso-fareast-language:EN-US"><span style="mso-list:Ignore">·<span style="font:7.0pt "Times New Roman"">
</span></span></span><![endif]><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">And you could regard it as a kind of bug-fix.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">I think we could bend the rules here.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">Simon<o:p></o:p></span></p>
<p class="MsoNormal"><a name="_MailEndCompose"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"><o:p> </o:p></span></a></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"> ghc-devs [mailto:ghc-devs-bounces@haskell.org]
<b>On Behalf Of </b>Boespflug, Mathieu<br>
<b>Sent:</b> 30 August 2016 19:05<br>
<b>To:</b> Ben Gamari <ben@well-typed.com><br>
<b>Cc:</b> GHC developers <ghc-devs@haskell.org><br>
<b>Subject:</b> Re: Last call for merge requests for 8.0.2<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Depends how you look at it I guess. It's arguably a fix to addModFinalizer, which never really worked for the use case it was intended since it was first introduced. This function was added by the author of language-c-inline, who wanted
things like<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">cos :: Double -> Double<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">cos x = [c| cos($x) |]<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">to work by having a new C wrapper function for the quasiquote be generated and written to disk at the end of the type checking phase. Doing it at the end means all quasiquotes in the whole module can be dumped at once. Problem is, the type
environment was not available by then, so the user was forced to provide an explicit type annotation to help with the code generation, as is done in inline-c:<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">cos :: Double -> Double<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">cos x = [c| double { cos($double:x) } |]<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">From GHC 7.8, types for locally bound variables weren't even available at the quasiquotation site, for reasons. But it's perfectly safe to make them available by the time all type checking is finished.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">We could wait of course, but in the meantime this is completely holding up the "inline" features of inline-java. Because for inline-java we decided that the (redundant) type annotations such as the above were really too verbose in the case
of Java, and would require significant hacks to the language-java parser, so we don't support them. That's why I for one am keen to have addModFinalizer make into a release as soon as possible.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">But I completely understand your risk aversion for a point release. Here's some data to help you evaluate the risk: the patch is specific to TH finalizers registered using addModFinalizer, a function that is currently used by only one package
out there at the moment: expandth (based on github code search - short of being able to code search all of Hackage directly).<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><br clear="all">
<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal">--<br>
Mathieu Boespflug<br>
Founder at <a href="https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2ftweag.io&data=01%7c01%7csimonpj%40microsoft.com%7cad4d06adb11c4cc9f1a408d3d10038a5%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=hMxE52Ftatu3waJaDsfVjEZeUNld8ier92n%2bTOyqOAA%3d" target="_blank">
http://tweag.io</a>.<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On 30 August 2016 at 17:59, Ben Gamari <<a href="mailto:ben@well-typed.com" target="_blank">ben@well-typed.com</a>> wrote:<o:p></o:p></p>
<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="margin-bottom:12.0pt">Facundo Domínguez <<a href="mailto:facundo.dominguez@tweag.io">facundo.dominguez@tweag.io</a>> writes:<br>
<br>
> Hello Ben,<br>
><br>
> Could we have these patches added?<br>
><br>
> <a href="https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2fgit.haskell.org%2fghc.git%2fcommit%2f56f47d4a4e418235285d8b8cfe23bde6473f17fc&data=01%7c01%7csimonpj%40microsoft.com%7cad4d06adb11c4cc9f1a408d3d10038a5%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=mrvqQEGkKEmitdQ8tIzeQMFgQ4BK8D5aDemG8%2f4cALg%3d" target="_blank">
http://git.haskell.org/ghc.git/commit/56f47d4a4e418235285d8b8cfe23bde6473f17fc</a><br>
> <a href="https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2fgit.haskell.org%2fghc.git%2fcommit%2f567dbd9bcb602accf3184b83050f2982cbb7758b&data=01%7c01%7csimonpj%40microsoft.com%7cad4d06adb11c4cc9f1a408d3d10038a5%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=bJD1ibohX2hB2Da6HeL8J4hA0TsE193W6%2b8OVYisjoI%3d" target="_blank">
http://git.haskell.org/ghc.git/commit/567dbd9bcb602accf3184b83050f2982cbb7758b</a><br>
><br>
> These allow reify to reach local variables when used with addModFinalizer.<br>
><br>
Hmm, I'm not sure; #11832 is strictly speaking a feature request which<br>
we try to avoid merging in minor releases to avoid introducing bugs.<br>
Given that 8.2.1 isn't that far away (hopefully early 2017), how<br>
terrible would it be if we punted this?<br>
<br>
Cheers,<br>
<br>
- Ben<br>
<br>
<br>
_______________________________________________<br>
ghc-devs mailing list<br>
<a href="mailto:ghc-devs@haskell.org">ghc-devs@haskell.org</a><br>
<a href="https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2fmail.haskell.org%2fcgi-bin%2fmailman%2flistinfo%2fghc-devs&data=01%7c01%7csimonpj%40microsoft.com%7cad4d06adb11c4cc9f1a408d3d10038a5%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=V5lt94aEjJCKJuVcnL8qglhDZytwINtKV4wKRIeR9zY%3d" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs</a><o:p></o:p></p>
</blockquote>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</body>
</html>