On Fri, Sep 3, 2010 at 5:26 PM, Ian Lynagh <span dir="ltr"><<a href="mailto:igloo@earth.li">igloo@earth.li</a>></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;">
<div class="im">On Tue, Aug 31, 2010 at 03:07:41PM +0200, Johan Tibell wrote:<br>
> Ticket: <a href="http://hackage.haskell.org/trac/ghc/ticket/4280" target="_blank">http://hackage.haskell.org/trac/ghc/ticket/4280</a><br>
<br>
</div>> -size t<br>
> - = case t of<br>
> - Tip -> 0<br>
> - Bin sz _ _ _ -> sz<br>
> +size = go<br>
> + where<br>
> + go Tip = 0<br>
> + go (Bin sz _ _ _) = sz<br>
> +{-# INLINE size #-}<br>
<br>
Perhaps just<br>
<br>
size Tip = 0<br>
size (Bin sz _ _ _) = sz<br>
<br>
would suffice :-)<br></blockquote><div><br>Yes, you're right. This function doesn't actually benefit from W/W as it doesn't have any higher-order arguments, dictionaries or polymorphic arguments.<br><br>I will take a second pass over all the code after the proposal period is over. With fresh eyes I might be able to spot more things that could be fixed/improved.<br>
<br></div></div>