Copyright | (c) 2017 Ertugrul Söylemez |
---|---|
License | BSD3 |
Maintainer | Ertugrul Söylemez <esz@posteo.de> |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
- withM_ :: Monad m => (s -> Wire m a b) -> m s -> Wire m a b
- filterE :: (a -> Bool) -> Event a -> Event a
- scan :: Monad m => a -> Wire m (Event (a -> a)) a
- scan' :: Monad m => a -> Wire m (Event (a -> a)) a
- scanE :: Applicative m => a -> Wire m (Event (a -> a)) (Event a)
- splitE :: Event (Either a b) -> (Event a, Event b)
- unalignE :: Event (These a b) -> (Event a, Event b)
- unlessE :: Event a -> Event b -> Event a
Wire utilities
withM_ :: Monad m => (s -> Wire m a b) -> m s -> Wire m a b Source #
Run the given action to initialise the given wire. Simplified
variant of withM
. Example:
withM_ (scan f) action
Event utilities
filterE :: (a -> Bool) -> Event a -> Event a Source #
Filter event occurrences using the given function.
scan' :: Monad m => a -> Wire m (Event (a -> a)) a Source #
Left scan and hold of the given event. The value switch occurs instantly.