Surprising strictness properties of pre-order fold over a Data.Map

Johan Tibell johan.tibell at
Wed Aug 18 10:54:33 EDT 2010

On Wed, Aug 18, 2010 at 4:38 PM, Lennart Augustsson <
lennart.augustsson at> wrote:

> You don't know that f is strict in its first argument so you cannot
> deduce that go is strict in z in the first case.

I'm not sure I understand.

f :: Int -> Int -> Int -> Int
f = \x y z -> x + y + z

in this particular case so it's strict in all its parameters since + is
strict (for Ints). f is inlined into go so it should be possible to deduce
that go is indeed strict. As I mentioned to Ian you get the same result if
you inline f manually.

-------------- next part --------------
An HTML attachment was scrubbed...

More information about the Glasgow-haskell-users mailing list