1 --!!! space leak from overloading !!!
4 -- This program develops a space leak if sfoldl isn't compiled with some
5 -- care. See comment about polymorphic recursion in TcMonoBinds.lhs
10 sfoldl :: (a -> Int -> a) -> a -> [Int] -> a
12 sfoldl f z (x:xs) = _scc_ "sfoldl1" (sfoldl f fzx (fzx `seq` xs))
13 where fzx = _scc_ "fzx" (f z x)
16 main = IO (\s -> case print (sfoldl (+) (0::Int) [1..200000]) of { IO a -> a s })