<div dir="ltr">Perhaps such warnings could be added to a tool like HLint? I do not think they belong in GHC.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 25, 2016 at 5:40 AM, Augustsson, Lennart <span dir="ltr"><<a href="mailto:Lennart.Augustsson@sc.com" target="_blank">Lennart.Augustsson@sc.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Yes, at this point I think the best we can do is to make sure we get good warnings.<br>
I'd suggest that we can attach a warning to a method in each instance.<br>
So when using length on a tuple we'd get a warning.<br>
I don't even want to upgrade ghc to get the FTP until such a warning is in place (we are still on 7.8).<br>
<span class="im HOEnZb"><br>
-----Original Message-----<br>
From: Libraries [mailto:<a href="mailto:libraries-bounces@haskell.org">libraries-bounces@haskell.org</a>] On Behalf Of Phil Ruffwind<br>
Sent: 25 February 2016 13:01<br>
To: Manuel Gómez<br>
Cc: Haskell Libraries<br>
</span><span class="im HOEnZb">Subject: Re: Haskell Foldable Wats<br>
<br>
</span><div class="HOEnZb"><div class="h5">> 2. to implement a language extension in GHC that allows source<br>
> language to specify a certain instance will never be defined and a<br>
> type error shall be thrown statically at any use site, or<br>
<br>
How about a feature that allows GHC to warn whenever a certain instance is used? That way, if you don't like a certain instance, you can put {-# FORBIDINSTANCE Foldable ((,) a) #-} in your modules and get warnings whenever that instance is used.<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>
</div></div><span class="im HOEnZb">This email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please delete all copies and notify the sender immediately. You may wish to refer to the incorporation details of Standard Chartered PLC, Standard Chartered Bank and their subsidiaries at <a href="http://www.standardchartered.com/en/incorporation-details.html" rel="noreferrer" target="_blank">http://www.standardchartered.com/en/incorporation-details.html</a><br>
<br>
Insofar as this communication contains any market commentary, the market commentary has been prepared by sales and/or trading desk of Standard Chartered Bank or its affiliate. It is not and does not constitute research material, independent research, recommendation or financial advice. Any market commentary is for information purpose only and shall not be relied for any other purpose, and is subject to the relevant disclaimers available at <a href="http://wholesalebanking.standardchartered.com/en/utility/Pages/d-mkt.aspx" rel="noreferrer" target="_blank">http://wholesalebanking.standardchartered.com/en/utility/Pages/d-mkt.aspx</a><br>
<br>
Insofar as this e-mail contains the term sheet for a proposed transaction, by responding affirmatively to this e-mail, you agree that you have understood the terms and conditions in the attached term sheet and evaluated the merits and risks of the transaction. We may at times also request you to sign on the term sheet to acknowledge in respect of the same.<br>
<br>
Please visit <a href="http://wholesalebanking.standardchartered.com/en/capabilities/financialmarkets/Pages/doddfrankdisclosures.aspx" rel="noreferrer" target="_blank">http://wholesalebanking.standardchartered.com/en/capabilities/financialmarkets/Pages/doddfrankdisclosures.aspx</a> for important information with respect to derivative products.<br>
</span><div class="HOEnZb"><div class="h5">_______________________________________________<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>
</div></div></blockquote></div><br></div>