
data World = World { ... }
wave1 :: Behavior World
wave2 :: Behavior World
worldB = wave1 `switcher` fmap (const wave2) (whenE (zeroCreeps wave1)
Oops. The list's spam-filter tossed this note.
---------- Forwarded message ----------
From: Alexander Foremny
where pollE = atTimes [1..]
zeroCreeps :: Behavior World -> Behavior Bool
When running worldB from main I can see the program's memory usage increasing and everything becomes very unresponsive. It seems as if whenE is accumalating all the occurences of the event. The problem seems to boil down to snapshot having the same behavior.
snapshot (pure False) (atTimes [1..])
This piece of code uses very much memory either. Is this due to reactive being broken (I read that somewhere) or is my solution just no solution at all? I am using ghc 6.12.1 with reactive 0.11.5 and reactive-glut 0.1.9. Regards Alexander Foremny
participants (1)
-
Conal Elliott