
On Mon, 12 Nov 2012, Bas van Dijk wrote:
On 12 November 2012 10:41, Henning Thielemann
wrote: There was already a discussion some weeks ago
Thanks, I missed that one. It seems it didn't reach a conclusion yet. Maybe we can continue the discussion here.
My impression is that making 'seq' available as function without a typeclass constraint was a step in the wrong direction. Then foldl' and friends were the second step in the wrong direction and scanl' would be the third step. For 'seq' I would propose we first start with a cleanly typed 'seq' and base foldl' functions on this function instead of the built-in 'seq'. But I assume that most of the time where foldl' is used, actually a deepseq-foldl' is meant. I have often seen foldl' in Haskell library code that had not the intended effect since the accumulator was a lazy pair or a Map.