<div dir="ltr">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<div><br></div><div>cos :: Double -> Double</div><div>cos x = [c| cos($x) |]</div><div><br></div><div>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:</div><div><br></div><div>cos :: Double -> Double</div><div>cos x = [c| double { cos($double:x) } |]</div><div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div>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).</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature">--<br>Mathieu Boespflug<br>Founder at <a href="http://tweag.io" target="_blank">http://tweag.io</a>.</div></div>
<br><div class="gmail_quote">On 30 August 2016 at 17:59, Ben Gamari <span dir="ltr"><<a href="mailto:ben@well-typed.com" target="_blank">ben@well-typed.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">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="http://git.haskell.org/ghc.git/commit/56f47d4a4e418235285d8b8cfe23bde6473f17fc" rel="noreferrer" target="_blank">http://git.haskell.org/ghc.<wbr>git/commit/<wbr>56f47d4a4e418235285d8b8cfe23bd<wbr>e6473f17fc</a><br>
> <a href="http://git.haskell.org/ghc.git/commit/567dbd9bcb602accf3184b83050f2982cbb7758b" rel="noreferrer" target="_blank">http://git.haskell.org/ghc.<wbr>git/commit/<wbr>567dbd9bcb602accf3184b83050f29<wbr>82cbb7758b</a><br>
><br>
> These allow reify to reach local variables when used with addModFinalizer.<br>
><br>
</span>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>______________________________<wbr>_________________<br>
ghc-devs mailing list<br>
<a href="mailto:ghc-devs@haskell.org">ghc-devs@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-<wbr>bin/mailman/listinfo/ghc-devs</a><br>
<br></blockquote></div><br></div>