frpnow 0.12 → 0.13
raw patch · 4 files changed
+17/−4 lines, 4 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Control.FRPNow.Lib: cstep :: a -> Event x -> a -> Behavior a
- Control.FRPNow.Time: integrate :: (Show v, Show time, VectorSpace v time) => Behavior time -> Behavior v -> Behavior (Behavior v)
+ Control.FRPNow.Time: integrate :: VectorSpace v time => Behavior time -> Behavior v -> Behavior (Behavior v)
Files
- ChangeLog +1/−0
- Control/FRPNow/Lib.hs +14/−2
- Control/FRPNow/Time.hs +1/−1
- frpnow.cabal +1/−1
ChangeLog view
@@ -1,3 +1,4 @@+0.13 Removed Show from integrate, added cstep 0.12 Fixed BehaviorFix, added integration 0.11 Fixed import applicative 0.1 Initial version
Control/FRPNow/Lib.hs view
@@ -12,6 +12,7 @@ module Control.FRPNow.Lib( -- * Behavior construction step,+ cstep, -- * Getting events from behaviors when, change,@@ -46,11 +47,22 @@ import Debug.Trace --- | Shorthand for +-- | Start with a constant and then switch -- --- > pure a `switch` s+-- Defined as: +--+-- > step a s = pure a `switch` s step :: a -> Event (Behavior a) -> Behavior a step a s = pure a `switch` s+++-- | Start with a constant, and switch to another constant when the event arrives.+--+-- Defined as:+-- +-- > cstep x e y = pure x `switch` (pure y <$ e)+cstep :: a -> Event x -> a -> Behavior a+cstep x e y = pure x `switch` (pure y <$ e) -- | Like 'Control.FRPNow.whenJust' but on behaviors of type @Bool@ instead of @Maybe@. --
Control/FRPNow/Time.hs view
@@ -125,7 +125,7 @@ -- | Integration using rectangle rule approximation. Integration depends on when we start integrating so the result is @Behavior (Behavior v)@.-integrate :: (Show v, Show time, VectorSpace v time) => +integrate :: (VectorSpace v time) => Behavior time -> Behavior v -> Behavior (Behavior v) integrate time v = do t <- time vp <- delay time (t,zeroVector) ((,) <$> time <*> v)
frpnow.cabal view
@@ -1,5 +1,5 @@ Name: frpnow-Version: 0.12+Version: 0.13 Synopsis: Principled practical FRP Description: FRP with first-class behaviors and interalized IO, without space leaks License: BSD3