You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The whole story is unfortunate. Historically, foldl' was lazy in the starting value for lists. Some other structures made it strict (I think that included HashMap, but I don't remember for sure). Then foldl' for lists became strict—by accident. Do we follow the trend? Probably yes. It's usually better that way, and there probably aren't many relying on the laziness.
Interesting, I found your issue for the accidental change: GHC #12173.
It seems that no one has complained about the change since, and there is one comment in favor of it.
I expect it would be fine to do the same for Seq too then.
This is unlike every other structure we have.
I think we should make these strict.
Perhaps it's worth mentioning that for lists,
foldl'
is strict in the starting value butfoldr'
is not (GHC #25508).The text was updated successfully, but these errors were encountered: