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