Comment on Turn O(n^2) reverse into O(n)parentComments−gwern12yHow would hlint catch this? The offending line is foldr (flip (buf_append bufOps)) (buf_empty bufOps) strs hlint doesn't know what 'buf_append bufOps' is, or 'buf_empty bufOps' or 'strs'.If you saw 'foldr (flip (u v)) (x y) z', would you immediately go 'ah, n^2! better throw a warning'? If not, why do you expect hlint to warn?
Comments
How would hlint catch this? The offending line is
hlint doesn't know what 'buf_append bufOps' is, or 'buf_empty bufOps' or 'strs'.If you saw 'foldr (flip (u v)) (x y) z', would you immediately go 'ah, n^2! better throw a warning'? If not, why do you expect hlint to warn?