netwire 4.0.4 → 4.0.5
raw patch · 4 files changed
+8/−8 lines, 4 files
Files
- Control/Wire.hs +1/−1
- Control/Wire/Prefab/Accum.hs +4/−4
- Control/Wire/Prefab/Simple.hs +2/−2
- netwire.cabal +1/−1
Control/Wire.hs view
@@ -317,7 +317,7 @@ held for: > jumpyClock =-> printf "%8.2f" <$> hold 0.5 (periodically 1 . time) <|>+> printf "%8.2f" <$> holdFor 0.5 (periodically 1 . time) <|> > "wait 500ms for the next second" You find a library of predefined event wires in the
Control/Wire/Prefab/Accum.hs view
@@ -70,7 +70,7 @@ accumT1 f x' = mkPure $ \dt x -> let y = f dt x' x in- y `seq` (Right y, accumT1 f y)+ x' `seq` (Right y, accumT1 f y) -- | Counts from the given vector adding the current input for the next@@ -122,11 +122,11 @@ -- | Like 'unfold', but the accumulation function also receives the -- current time delta. ----- * Depends: current instant, if the unfolding function is strict in--- its third argument.+-- * Depends: current instant, if the given function is strict in its+-- third argument. unfoldT :: (Time -> s -> a -> (b, s)) -> s -> Wire e m a b unfoldT f s' = mkPure $ \dt x' -> let (x, s) = f dt s' x' in- x `seq` (Right x, unfoldT f s)+ s' `seq` (Right x, unfoldT f s)
Control/Wire/Prefab/Simple.hs view
@@ -35,10 +35,10 @@ -- | One-instant delay. ----- * Depends: Previous instant.+-- * Depends: previous instant. delay :: a -> Wire e m a a-delay x' = mkPure (\_ x -> (Right x', delay x))+delay x' = mkPure (\_ x -> x' `seq` (Right x', delay x)) -- | Acts like the identity wire, but forces evaluation of the signal to
netwire.cabal view
@@ -1,5 +1,5 @@ Name: netwire-Version: 4.0.4+Version: 4.0.5 Category: Control, FRP Synopsis: Flexible wire arrows for FRP Maintainer: Ertugrul Söylemez <es@ertes.de>