<div dir="ltr">The culprit seems to be that<pre><span class=""><font color="#0000ff" face="arial, sans-serif">instance</font></span><span style="color:rgb(0,0,0);font-family:arial,sans-serif"> </span><span class="" style="color:rgb(0,0,0);font-family:arial,sans-serif">Foldable</span><span style="color:rgb(0,0,0);font-family:arial,sans-serif"> </span><span class="" style="color:rgb(0,0,0);font-family:arial,sans-serif">[]</span><span style="color:rgb(0,0,0);font-family:arial,sans-serif"> </span><span class="" style="color:blue;font-family:arial,sans-serif">where</span><font color="#000000"><br></font></pre><pre style="color:rgb(0,0,0)"><a name="line-226"></a>    <span class="">elem</span>    <span class="" style="color:red">=</span> <span class="">List</span><span class="">.</span><span class="">elem</span>
<a name="line-227"></a>    <span class="">foldl</span>   <span class="" style="color:red">=</span> <span class="">List</span><span class="">.</span><span class="">foldl</span>
<a name="line-228"></a>    <span class="">foldl'</span>  <span class="" style="color:red">=</span> <span class="">List</span><span class="">.</span><span class="">foldl'</span>
<a name="line-229"></a>    <span class="">foldl1</span>  <span class="" style="color:red">=</span> <span class="">List</span><span class="">.</span><span class="">foldl1</span>
<a name="line-230"></a>    <span class="">foldr</span>   <span class="" style="color:red">=</span> <span class="">List</span><span class="">.</span><span class="">foldr</span>
<a name="line-231"></a>    <span class="">foldr1</span>  <span class="" style="color:red">=</span> <span class="">List</span><span class="">.</span><span class="">foldr1</span>
<a name="line-232"></a>    <span class="">length</span>  <span class="" style="color:red">=</span> <span class="">List</span><span class="">.</span><span class="">length</span>
<a name="line-233"></a>    <span class="">maximum</span> <span class="" style="color:red">=</span> <span class="">List</span><span class="">.</span><span class="">maximum</span>
<a name="line-234"></a>    <span class="">minimum</span> <span class="" style="color:red">=</span> <span class="">List</span><span class="">.</span><span class="">minimum</span>
<a name="line-235"></a>    <span class="">null</span>    <span class="" style="color:red">=</span> <span class="">List</span><span class="">.</span><span class="">null</span>
<a name="line-236"></a>    <span class="">product</span> <span class="" style="color:red">=</span> <span class="">List</span><span class="">.</span><span class="">product</span>
<a name="line-237"></a>    <span class="">sum</span>     <span class="" style="color:red">=</span> <span class="">List</span><span class="">.</span><span class="">sum</span>
<a name="line-238"></a>    <span class="">toList</span>  <span class="" style="color:red">=</span> <span class="">id</span>
</pre><div>delegates to monomorphic methods rather than implementing them directly. </div><div><br></div><div>The early testing where we showed that it didn't break RULES was done with the final definitions in the class rather than delegating to GHC.OldList.</div><div><br></div><div>Somewhere when reorganizing of the code we switched to this style and introduced this problem, making RULES much more brittle. =/</div><div><br></div><div>-Edward</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Apr 1, 2015 at 7:14 AM, Joachim Breitner <span dir="ltr"><<a href="mailto:mail@joachim-breitner.de" target="_blank">mail@joachim-breitner.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I just stumbled over a FTP breakage: A RULES with "foldr" on the left<br>
hand side would no longer fire, because it would refer to<br>
Foldable.foldr, and not the monomorphic foldr.<br>
<br>
Adding<br>
#if MIN_VERSION_base(4,8,0)<br>
import Prelude hiding (foldr)<br>
import GHC.OldList (foldr)<br>
#endif<br>
to the file solved the problem for now, but GHC.OldList is supposed to<br>
go away eventually, so I believe we need a permanent location for the<br>
monomorphic foldr.<br>
<br>
Or will we simply not get rid of GHC.OldList at all?<br>
<br>
(One could argue that "foldr" on the left-hand-side of a RULE should<br>
work and that this is a GHC bug, though.)<br>
<br>
Greetings,<br>
Joachim<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Joachim “nomeata” Breitner<br>
  <a href="mailto:mail@joachim-breitner.de">mail@joachim-breitner.de</a> • <a href="http://www.joachim-breitner.de/" target="_blank">http://www.joachim-breitner.de/</a><br>
  Jabber: <a href="mailto:nomeata@joachim-breitner.de">nomeata@joachim-breitner.de</a>  • GPG-Key: 0xF0FBF51F<br>
  Debian Developer: <a href="mailto:nomeata@debian.org">nomeata@debian.org</a><br>
</font></span><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" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br>
<br></blockquote></div><br></div>