1 patch for repository http://darcs.haskell.org/packages/parallel: Mon May 16 16:23:46 CEST 2011 Daniel Fischer * Ensure non-empty chunks (#5100) parListChunks produced a stack-overflow if the chunk-size parameter was less than 1, as reported in http://hackage.haskell.org/trac/ghc/ticket/5100. This patch makes sure that no non-empty chunks are produced. New patches: [Ensure non-empty chunks (#5100) Daniel Fischer **20110516142346 Ignore-this: 20b1530ed1a369a4cea382ad46762143 parListChunks produced a stack-overflow if the chunk-size parameter was less than 1, as reported in http://hackage.haskell.org/trac/ghc/ticket/5100 This patch makes sure that no non-empty chunks are produced. ] hunk ./Control/Parallel/Strategies.hs 426 -- parListChunk :: Int -> Strategy a -> Strategy [a] parListChunk n strat xs = - concat `fmap` parList (evalList strat) (chunk n xs) + concat `fmap` parList (evalList strat) (chunk (max 1 n) xs) + -- Ensure that chunk doesn't produce an infinite list of empty lists, + -- which it would do for n < 1, causing a stack-overflow, + -- cf. #5100 chunk :: Int -> [a] -> [[a]] chunk _ [] = [] Context: [TAG git migration Ian Lynagh **20110331135045 Ignore-this: 31dd9f6ef055455751f877956ed9e847 ] Patch bundle hash: 18c7c3bcbab463142aebd2e3f2499ed57668193d