Re: [reactive] Time leak problem with integral

It leaks with me too. It's the same problem I'm having with my Pong attempt (see my post http://www.haskell.org/pipermail/reactive/2010-May/000337.html) The more often the integration event ticks, the quicklier the program time-leaks. I'm also using reactive 0.11.4 and GHC 6.12.1. I'm running Ubuntu 9.10 64bits version. Doesn't matter whether I use -O2 or not.
Hi folks,
I've got stacked now because of a time leak problem with integral. The following program leaks CPU-time gradually:
1) why is the leak happen? 2) how can I fix this problem?
* main :: IO () *>* main = adaptE $ print <$> car `snapshot_` atTimes [0, 0.5..]
* car :: Behavior Car *>* car = Car <$> velocity <*> position
* position :: Behavior Position *>* position = integral (atTimes [0, 0.5 ..]) velocity
* velocity :: Behavior Velocity *>* velocity = 1
* data Car = Car { vel :: Velocity, pos :: Position } deriving Show
* type Velocity = Double *>* type Position = Double
* import FRP.Reactive *>* import FRP.Reactive.LegacyAdapters *>* import Control.Applicative
Some more detailed informations: * reactive 0.11.4 * GHC 6.12.1 * Gentoo Linux (2.6.32-tuxonice, x86_64) * compiled with or without -O2 flag
Thanks, -- Mitsutoshi Aoe
participants (1)
-
Limestraël