
Hi Eyal,
Yes, integral is probably broken. It uses snapshot, which uses event join,
which relies on my new unreleased changes in the structure of Time, which
relies on unamb working well, which needs recent fixes to GHC's run-time
system.
Thanks to community input (notably from Sterling, Bertram, and Simon M), the
RTS problems were identified and solved. I'm waiting for a stable ghc
snapshot with RTS fixes that will then unblock unamb and the new Reactive
stuff.
Regards, - Conal
2009/1/13 Eyal Lotem
The problematic expression is:
let ticks = R.atTimes [0,0.1..] :: R.Event () integration = ticks `R.integral` R.time in integration
The value inside integration is always 0.
But here is a full sample program to demonstrate the problem:
{-# OPTIONS -fglasgow-exts -O2 -Wall #-}
import Control.Applicative import qualified FRP.Reactive as R import qualified Graphics.FieldTrip as FT import Graphics.FieldTrip((*%)) import qualified FRP.Reactive.FieldTrip.Adapter as FieldTripA
resize :: (FT.Transform (FT.Transform3 s) a) => s -> a -> a resize size = (FT.uscale3 size *%)
utext :: String -> FT.Geometry3 utext = FT.flatG . FT.utext
main :: IO () main = do let ticks = R.atTimes [0,0.1..] :: R.Event () integration = ticks `R.integral` R.time FieldTripA.anim3 . pure $ resize (0.3::Double) . utext . show <$> integration
_______________________________________________ Reactive mailing list Reactive@haskell.org http://www.haskell.org/mailman/listinfo/reactive