On Thu, Jun 18, 2009 at 9:55 PM, Ross Mellgren <rmm-haskell@z.odi.ac> wrote:
It looks offhand like you're not being strict enough when you put things back in the IORef, and so it's building up thunks of (+1)...
With two slight mods:go n = do modifyIORef ior (\ x -> let x' = x+1 in x `seq` x')
go 0 = return ()
go n = do modifyIORef ior (+1)
go (n-1)
-->
go 0 = return ()
go (n-1)