| Copyright | (c) 2017 Ertugrul Söylemez |
|---|---|
| License | BSD3 |
| Maintainer | Ertugrul Söylemez <esz@posteo.de> |
| Stability | experimental |
| Safe Haskell | None |
| Language | Haskell2010 |
Control.Wire.Varying
Description
- data Varying a
- changes :: Varying a -> Event a
- value :: Varying a -> a
- holdV :: Applicative m => a -> Wire m (Event a) (Varying a)
- holdV' :: Applicative m => a -> Wire m (Event a) (Varying a)
- scanV :: Applicative m => (a -> b -> b) -> b -> Wire m (Event a) (Varying b)
- animateV :: Applicative m => (a -> m b) -> Wire m (Varying a) (Varying b)
Time-varying values
A Varying is a behaviour combined with an event that tracks when
the value changes.
Instances
| Monad Varying Source # | |
| Functor Varying Source # | |
| Applicative Varying Source # | |
| Foldable Varying Source # | |
| Bounded a => Bounded (Varying a) Source # | |
| Floating a => Floating (Varying a) Source # | |
| Fractional a => Fractional (Varying a) Source # | |
| Num a => Num (Varying a) Source # | |
| IsString a => IsString (Varying a) Source # | |
| NFData a => NFData (Varying a) Source # | |
Events
holdV :: Applicative m => a -> Wire m (Event a) (Varying a) Source #
Hold the latest occurrence of the given event starting with the given initial value. The value switch occurs in the next frame.
holdV' :: Applicative m => a -> Wire m (Event a) (Varying a) Source #
Hold the latest occurrence of the given event starting with the given initial value. The value switch occurs instantly.
scanV :: Applicative m => (a -> b -> b) -> b -> Wire m (Event a) (Varying b) Source #
Left scan and hold of the given event.