sum for lists is implemented using foldl rather than foldl' so I suspect that's the origin of the issue. Somehow, ($!) seems to give GHC enough of a hint so as to optimize smarter thereby avoiding the thunk build-up. I don't know how this occurs though.