Copyright | (c) 2015 Rongcui Dong |
---|---|
License | BSD3 |
Maintainer | Rongcui Dong <karl_1702@188.com> |
Safe Haskell | Safe |
Language | Haskell2010 |
- occursFor :: Monad m => b -> Int -> Signal s m a b
- snapOnce :: Monad m => Signal s m a a
- inhibitsAfter :: Int -> Signal s m a a
- runAndHold :: Monad m => Signal s m a b -> Signal s m a b
- rising :: Monad m => Bool -> Signal s m Bool Bool
- falling :: Monad m => Bool -> Signal s m Bool Bool
- edge :: Monad m => Bool -> Signal s m Bool Bool
Documentation
Produces output for a several sample periods, then inhibits.
Typical usage:
() `occursFor` 1 >>> <some IO actions> >>> snapOnce
The example above will perform the IO action once and then hold the result forever
snapOnce :: Monad m => Signal s m a a Source
Takes the snapshot of the value when signal is activated, and then holds value forever
Typical usage:
() `occursFor` 1 >>> <some IO actions> >>> snapOnce
The example above will perform the IO action once and then hold the result forever
inhibitsAfter :: Int -> Signal s m a a Source
Acts as identity for a several sample periods, then inhibits.
runAndHold :: Monad m => Signal s m a b -> Signal s m a b Source
Runs a signal once and hold the result forever.
It is a combination of inhibitsAfter
and snapOnce
Rising edge filter. Creates an impulse at rising edge
Falling edge filter. Creates an impulse at falling edge