packages feed

elerea 2.5.0 → 2.6.0

raw patch · 5 files changed

+37/−1 lines, 5 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ FRP.Elerea.Clocked: snapshot :: Signal a -> SignalGen a
+ FRP.Elerea.Param: snapshot :: Signal a -> SignalGen p a
+ FRP.Elerea.Simple: snapshot :: Signal a -> SignalGen a

Files

CHANGES view
@@ -1,3 +1,7 @@+2.6.0 - 111211+* added snapshot to all variants, which allows sampling signals within+  signal generators+ 2.5.0 - 111122 * added SignalGen liftIO equivalent to assist library writers * simplified the signatures of effectful* combinators
FRP/Elerea/Clocked.hs view
@@ -73,6 +73,7 @@     , externalMulti     -- * Basic building blocks     , delay+    , snapshot     , generator     , memo     , until@@ -282,6 +283,16 @@     let update x = s >>= \x' -> x' `seq` writeIORef ref (Updated x' x)      addSignal return update ref pool++-- | A formal conversion from signals to signal generators, which+-- effectively allows for retrieving the current value of a previously+-- created signal within a generator.  This includes both signals+-- defined in an external scope as well as those created earlier in+-- the same generator.  It can be modelled by the following function:+--+-- > snapshot s t_start s_clock = s t_start+snapshot :: Signal a -> SignalGen a+snapshot (S s) = SG $ \_ _ -> s  -- | Auxiliary function. memoise :: IORef (Phase a) -> a -> IO a
FRP/Elerea/Param.hs view
@@ -22,6 +22,7 @@     , externalMulti     -- * Basic building blocks     , delay+    , snapshot     , generator     , memo     , until@@ -224,6 +225,16 @@   let update x = s >>= \x' -> x' `seq` writeIORef ref (Updated x' x)    addSignal return update ref pool++-- | A formal conversion from signals to signal generators, which+-- effectively allows for retrieving the current value of a previously+-- created signal within a generator.  This includes both signals+-- defined in an external scope as well as those created earlier in+-- the same generator.  It can be modelled by the following function:+--+-- > snapshot s t_start s_input = s t_start+snapshot :: Signal a -> SignalGen p a+snapshot (S s) = SG $ \_ _ -> s  -- | Auxiliary function. memoise :: IORef (Phase a) -> a -> IO a
FRP/Elerea/Simple.hs view
@@ -18,6 +18,7 @@     , externalMulti     -- * Basic building blocks     , delay+    , snapshot     , generator     , memo     , until@@ -214,6 +215,15 @@   let update x = s >>= \x' -> x' `seq` writeIORef ref (Updated x' x)    addSignal return update ref pool++-- | A formal conversion from signals to signal generators, which+-- effectively allows for retrieving the current value of a previously+-- created signal within a generator.  This includes both signals+-- defined in an external scope as well as those created earlier in+-- the same generator.  In the model, it corresponds to the identity+-- function.+snapshot :: Signal a -> SignalGen a+snapshot (S s) = SG $ \_ -> s  -- | Auxiliary function. memoise :: IORef (Phase a) -> a -> IO a
elerea.cabal view
@@ -1,5 +1,5 @@ Name:                elerea-Version:             2.5.0+Version:             2.6.0 Cabal-Version:       >= 1.2 Synopsis:            A minimalistic FRP library Category:            reactivity, FRP