tl;dr
Isn't the fact that 20 < length $ take 10 $ whatever requires whatever to successfully pattern patch a list (at least either [] or (_:_)) a "lack" of laziness?
Or, in other words, why isn't (20 >) . length . take 10 === const True, so that applying either of them to anything requires no evaluation of the argument whatsoever?
Is (20 >) . length . take 10 !== const True a necessity? Or a design choice? In either case, why?
Foreword
This is a follow up to my previous question.
There I asked about why fix error prints *** Exception: repeatedly and infinitely.
The answer was satisfactory.
My lucubration
However, I played around a bit with ghci and realized that take 0 $ fix error expectedly returns "", and length $ take 0 $ fix error returns 0.
On the other hand, the following prints the *** Exception: infinite flow:
20 > (length $ take 10 $ fix error)
I understand that if even one single elmenent of fix error is computed (attempted to, actually), the result is what it is, but my question is: why is the evaluation of any of them needed in the first place, in that specific expression? After all, length $ take 10 $ whatever can't be other than <= 10, hence < 20, so the expression should evaluate to True.
Actually, I see that 20 > (length $ take 10 $ [fix error]) returns immediately with True. Probably the whole point is that take 10 expects to work on a [a], and so length $ take 10 $ [fix error] doens't need to evaluate fix error to be sure it's working on a [a]. Indeed, I've verified that 20 > (length $ take 10 $ undefined) errors too (even though not with an infinitely repeating error), whereas 20 > (length $ take 10 $ [undefined]) returns with True.
Maybe that's what Willem Van Onsem meant in this comment.
Anyway, since I can write the expression above as
((20 >) . length . take 10) $ fix error
I would be tempted to say that
(20 >) . length . take 10 === const True
and hence I'd say it's reasonable for ((20 >) . length . take 10) $ fix error to return True just like const True $ fix error returns True.
But that's not the case. Why?