<div dir="ltr">Hi,<div><br></div><div>objection! :-) </div><div><br></div><div>If we were to delay things, we would ship a version of the library that has missing functionality *and* we'll break everyone's code on the next release. If we make the change now, then at least when people fix their TH code to work with GHC 8, they'd be getting access to more functionality.</div><div><br></div><div>This change does indeed change the data structure for declarations, so if you were working with it directly, indeed you'll have to make changes. However, if you use the "smart" constructors in TH, you shouldn't need to change anything.</div><div>In particular, I left `instanceD` as before---it does not add any overlapping pragmas, and I added a new function `instanceWithOverlapD`, which has an extra parameter that allows you to specify pragmas.</div><div><br></div><div>I'd like to get this in, if possible, as I have a library that needs this feature. My current work-around it quite ugly: ask the clients of the library to enable "Language OverlappingInstaces", which is cumbersome, *and* generates deprecation warnings.</div><div><br></div><div>-Iavor</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 14, 2016 at 1:59 PM, Richard Eisenberg <span dir="ltr"><<a href="mailto:eir@cis.upenn.edu" target="_blank">eir@cis.upenn.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I'm happy to be overruled on this, but I vote against this change for GHC 8. Personally, I like to have a policy of "no TH changes after the first RC". This gives ample time for TH clients to update their code. Iavor's suggestion would likely involve a new part of the InstanceD constructor, which would affect anyone constructing or matching on this constructor. If the change involved, say, only adding new functionality without changing anything existing, I would be more willing to include for GHC 8.<br>
<br>
And, yes, I agree with Austin.<br>
<span class="HOEnZb"><font color="#888888"><br>
Richard<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Apr 14, 2016, at 2:17 PM, Austin Seipp <<a href="mailto:austin@well-typed.com">austin@well-typed.com</a>> wrote:<br>
<br>
> Here's a question, on top of this one: why don't we require<br>
> template-haskell changes for most corresponding syntax changes? We<br>
> tend to play catch up with template-haskell sometimes and it's<br>
> relatively strange. I mean, in some sense, we could have said a while<br>
> back "This needs another revision, please add template haskell<br>
> support" and avoided it all.<br>
><br>
> Richard has a better insight into this than I do, I'm sure, but it<br>
> seems - to me, anyway - like template-haskell support is a reasonable<br>
> bar for most surface-level syntax change to cross, before getting<br>
> merged.<br>
><br>
> My intuition tells me that, most of the time, a lot of us simply<br>
> forget to make the changes, or ask for them in reviews, and so it<br>
> goes.<br>
><br>
> On Thu, Apr 14, 2016 at 1:12 PM, Ben Gamari <<a href="mailto:ben@well-typed.com">ben@well-typed.com</a>> wrote:<br>
>> Iavor Diatchki <<a href="mailto:iavor.diatchki@gmail.com">iavor.diatchki@gmail.com</a>> writes:<br>
>><br>
>>> Hello,<br>
>>><br>
>>> Now that "OVERLAPPING" and "OVERLAPPABLE" are pragmas on the instances, do<br>
>>> we have a way to generate instances with such pragmas using Template<br>
>>> Haskell? I can't seem to find a way to do this, which is unfortunate.<br>
>>><br>
>>> If I am not missing anything, would there be objections to adding it to the<br>
>>> TH library before the next release---I would volunteer to do the change<br>
>>> ASAP.<br>
>>><br>
>> Indeed this is an unfortunate gap. Given that this shouldn't be a<br>
>> terribly invasive change I would be alright with this if Richard approves.<br>
>><br>
>> Cheers,<br>
>><br>
>> - Ben<br>
>><br>
>><br>
>> _______________________________________________<br>
>> Libraries mailing list<br>
>> <a href="mailto:Libraries@haskell.org">Libraries@haskell.org</a><br>
>> <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br>
>><br>
><br>
><br>
><br>
> --<br>
> Regards,<br>
><br>
> Austin Seipp, Haskell Consultant<br>
> Well-Typed LLP, <a href="http://www.well-typed.com/" rel="noreferrer" target="_blank">http://www.well-typed.com/</a><br>
<br>
</div></div></blockquote></div><br></div>