Terrible! Quite sorry that this seems to be a bug in the monad-par library.
I'm copying some of the other monad-par authors and we hopefully can get to
the bottom of this. If it's not possible to create a smaller reproducer,
is it possible to share the original test that triggers this problem? In
the meantime, it's good that you can at least run without parallelism.
I have attached an even simpler test that directly uses the monad-par
library. The function "test" simply adds one to a list of numbers
indefinitely using "parMap" and displays every intermediate result.
When running the program on multiple cores the bug occurs every time
for me.
Thanks for looking into this!
Regards,
Till
import Control.Monad.Par
test :: [Int] -> IO [Int]
test xs = do
let list = runPar $ parMap (\x -> x + 1) xs
putStrLn $ show list
test list
main = do
test [1]
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe