
30 Dec
2012
30 Dec
'12
2:22 p.m.
Hi Artyom! Thanks for your response. It seems your tactic has worked. I was so focused on programming "inside" the gloss parameter that I completely forgot about programming in the "outside". Here is what I did (I picked MVar's): myprog s = do ... var <- newMVar w0 let loop w = do w' <- step s w putMVar var w' loop w' forkIO $ loop w0 simulateIO ... (\_ _ w -> fmap (fromMaybe w) $ tryTakeMVar var) And it's working just fine! Best regards, Daniel Díaz.