On Fri, Aug 20, 2010 at 11:20 AM, Johan Tibell <johan.tibell@gmail.com> wrote:
On Fri, Aug 20, 2010 at 11:13 AM, Roman Leshchinskiy <rl@cse.unsw.edu.au> wrote:
Out of curiosity, is balance strict in the third argument? If not, does it make a difference if you make it strict?

I haven't checked since Milan completely rewrote balance but hasn't integrated his changes yet. I'll have a look at balance once those changes are in.

$ ghc --show-iface dist/build/Data/Map.hi

<snip>
   balance :: forall k a.
             k -> a -> Data.Map.Map k a -> Data.Map.Map k a -> Data.Map.Map k a
    {- Arity: 4 Strictness: SLSS -}
<snip>

So I guess it's strict in the 3rd (and 4th) argument.

-- Johan