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@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe