Copyright | (c) Ertugrul Soeylemez 2013 Rongcui Dong 2015 |
---|---|
License | BSD3 |
Maintainer | Rongcui Dong <karl_1702@188.com> |
Safe Haskell | Safe |
Language | Haskell2010 |
This module contains the lowest level primitives of timeless, directly working with the Signal arrow. Try not to use them as they tend to be very hard to grasp. Use them only when building a new FRP framework.
Understand that using Signal
directly can be difficult to reason about
- mkEmpty :: Signal m a b
- mkId :: Signal m a a
- mkConst :: Maybe b -> Signal m a b
- mkPure :: (a -> (Maybe b, Signal m a b)) -> Signal m a b
- mkGen :: Monad m => (a -> m (Maybe b, Signal m a b)) -> Signal m a b
- mkPure_ :: (a -> Maybe b) -> Signal m a b
- mkSF :: (a -> (b, Signal m a b)) -> Signal m a b
- mkSF_ :: (a -> b) -> Signal m a b
- mkSW_ :: b -> (b -> a -> b) -> Signal m a b
- mkGen_ :: Monad m => (a -> m (Maybe b)) -> Signal m a b
- mkKleisli_ :: Monad m => (a -> m b) -> Signal m a b
- mkSK_ :: Monad m => b -> (b -> a -> m b) -> Signal m a b
- mkConstM :: Monad m => m b -> Signal m a b
- mkActM :: Monad m => m b -> Signal m a b
- delay :: a -> Signal m a a
Basic Signals
mkPure :: (a -> (Maybe b, Signal m a b)) -> Signal m a b Source #
Make a pure stateful signal from given transition function
mkGen :: Monad m => (a -> m (Maybe b, Signal m a b)) -> Signal m a b Source #
Make a stateful signal from given (Monadic) transition function
Pure Signals
Signals
mkSF :: (a -> (b, Signal m a b)) -> Signal m a b Source #
Make a pure stateful signal from given signal function
mkSW_ :: b -> (b -> a -> b) -> Signal m a b Source #
Make a stateful wire from chained state transition function. Notice that the output will always be the new value
Monadic Signals
mkGen_ :: Monad m => (a -> m (Maybe b)) -> Signal m a b Source #
Make a stateless signal from given function
Kleisli Signals
mkKleisli_ :: Monad m => (a -> m b) -> Signal m a b Source #
Make a stateless signal from Kleisli function
mkSK_ :: Monad m => b -> (b -> a -> m b) -> Signal m a b Source #
Make a stateful signal from Kleisli function