So below is something I discovered that seems very strange.
If you run the following code as is, it will run & you'll get stuck in the already documented integral loop.
If you replace the use of events in main with events', the program consumes all available memory & locks up hard.
I know I'm horribly abusing Reactive here, but I don't see why it should fail _so_ ungracefully.
Cheers,
Creighton
import FRP.Reactive
import FRP.Reactive.LegacyAdapters
import Control.Concurrent
import Control.Monad
x :: Event () -> Behavior Double
x e = b where b = integral e b
events :: Event ()
events = atTimes [0.1,0.2]
events' :: Event ()
events' = once events
schedule a = threadDelay 100000 >> a
main = do
c <- makeClock
u <- mkUpdater (cGetTime c) (fmap print $ x events)
forever $ schedule u