On Fri, Sep 3, 2010 at 5:07 PM, Ian Lynagh <span dir="ltr">&lt;<a href="mailto:igloo@earth.li">igloo@earth.li</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

On Sun, Aug 29, 2010 at 06:15:45AM -0700, Donald Bruce Stewart wrote:<br>
Also, could the tests module be made -Wall clean, and compiled with<br>
-Wall? That way it is harder to accidentally not run a test, by defining<br>
it but not adding it to the list of tests.<br></blockquote><div><br>If the proposal is accepted we can -Wall clean the code before submitting.<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">


&gt; +{-# DEPRECATED fold &quot;Use foldrWithKey instead&quot; #-}<br>
&gt; +{-# DEPRECATED foldWithKey &quot;Use foldrWithKey instead&quot; #-}<br>
<br>
I didn&#39;t expect to see DEPRECATED pragmas being added in the middle of a<br>
patch called &quot;Performance improvements to Data.Map&quot;!<br>
<br>
Why have these been deprecated?<br></blockquote><div><br>They were already deprecated in the Haddock comments so I took the liberty to add a deprecate pragma. If people disagree with this we could remove them.<br> </div>

<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
&gt; +{-<br>
&gt; +-- | /O(log n)/. A strict version of &#39;insertLookupWithKey&#39;.<br>
&gt; +insertLookupWithKey&#39; :: Ord k =&gt; (k -&gt; a -&gt; a -&gt; a) -&gt; k -&gt; a -&gt; Map k<br>
&gt; a<br>
&gt; +                     -&gt; (Maybe a, Map k a)<br>
&gt; +insertLookupWithKey&#39; f kx x = kx `seq` go<br>
&gt; +  where<br>
&gt; +    go Tip = x `seq` (Nothing, singleton kx x)<br>
&gt; +    go (Bin sy ky y l r) =<br>
&gt; +        case compare kx ky of<br>
&gt; +            LT -&gt; let (found, l&#39;) = go l<br>
&gt; +                  in (found, balance ky y l&#39; r)<br>
&gt; +            GT -&gt; let (found, r&#39;) = go r<br>
&gt; +                  in (found, balance ky y l r&#39;)<br>
&gt; +            EQ -&gt; let x&#39; = f kx x y in x&#39; `seq` (Just y, Bin sy kx x&#39; l<br>
&gt; r)<br>
&gt; +{-# INLINE insertLookupWithKey&#39; #-}<br>
&gt; +-}<br>
<br>
Why has this new function been added, but commented out?<br></blockquote><div><br>These should have been in a separate patch (see separate ticket for adding those).<br><br>-- Johan<br><br></div></div>