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.
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to