id summary reporter owner description type status priority milestone component version resolution keywords cc os architecture failure testcase blockedby blocking related differential wikipage
2754 Strictness analyzer fails on an implementation of foldl nimnul "foldB has O(1) complexity, but foldA O(N). Looks like a strictness analyzer failure.
{{{
module Main where
foldA :: (a -> e -> a) -> a -> [e] -> a
foldA _ r [] = r
foldA op r (x:xs) = foldA op (op r x) xs
foldB :: (a -> e -> a) -> a -> [e] -> a
foldB _ r [] = r
foldB op r (x:xs) = r' `seq` foldB op r' xs where r' = op r x
l :: [Int]
l = [1..100*1000*1000]
main = print $ foldl (+) 0 l
}}}" feature request closed normal Compiler 6.8.3 invalid Windows x86