DavidA wrote:
> I am having difficulty debugging a troublesome stack overflow, which I
> think might be related to calling unsafePerformIO from within the IO
> monad.
>
> [...]
>
> f x = unsafePerformIO $ do
> m <- randomRIO (1,2)
> return (m+x)
As a side note you don't need unsafePerfor
Bas van Dijk gmail.com> writes:
>
> It looks like your timedIterateIO is too lazy.
>
> Try evaluating the 'y' before calling timedIterateIO' again as in:
>
> let y = f x
> ... y `seq` timedIterateIO' t0 y
>
Thank you,
that appears to do the trick.
I'm still a bit puzzled about why the prob