(Sorry for the double mail) ...so there is no way to do that inside the function passed to modifySTRef? In other words, there is no way to ensure *inside* a function that its result will be evaluated strictly?
modifySTRef looks like this (sugared up a bit):
modifySTRef r f = do x <- readSTRef r writeSTRef r (f x)
Note that this writes the *thunk* (f x) to the STRef, and there is absolutely nothing you can do about it. "f" isn't demanded by this function, let alone "f x".
You can implement your own strict modifySTRef' easily though, as other people in this thread have shown.