7 Jan 2013 07:56
help diagnosing space leak with IORef/STRef, just incrementing a million times.
Thomas Bereknyei <tomberek <at> gmail.com>
2013-01-07 06:56:12 GMT
2013-01-07 06:56:12 GMT
I have had issues like this with modifySTRef before. Try to make a strict version modifySTRef'
If memory serves, something like this worked for me.
modifySTRef' r f =
do
a <- readSTRef r
writeSTRef r $! f a
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe <at> haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
RSS Feed