Safe Haskell | Safe-Infered |
---|

- data Event a
- data Behavior a
- type BehaviorGen a = Behavior (Behavior a)
- runBehavior :: Behavior b -> IO b
- mkE :: IO (a -> IO (), Event a)
- liftBG :: Behavior a -> BehaviorGen a
- bindBG :: (Behavior a -> BehaviorGen b) -> BehaviorGen a -> BehaviorGen b
- utcTimeB :: Behavior UTCTime
- elapsedTimeB :: BehaviorGen NominalDiffTime
- elapsedTimeNumB :: Fractional a => BehaviorGen a
- dswitchB :: Behavior a -> Event (a -> Behavior a) -> BehaviorGen a
- switchB :: Behavior a -> Event (Behavior a) -> BehaviorGen a
- constB :: a -> Behavior a
- stepB :: a -> Event a -> BehaviorGen a
- accumB :: a -> Event (a -> a) -> BehaviorGen a
- ifB :: Behavior Bool -> Behavior a -> Behavior a -> Behavior a
- genIntegralB :: (Num t, Num a, Num b) => ((t, a) -> (t, a) -> b -> b) -> Event x -> Behavior t -> b -> Behavior a -> BehaviorGen b
- trapIntegralB :: (Eq a, Fractional a) => Event x -> Behavior a -> a -> Behavior a -> BehaviorGen a
- nullE :: Event a
- appendE :: Event a -> Event a -> Event a
- concatE :: [Event a] -> Event a
- snapshotE :: Behavior a -> Event b -> Event a
- snapshotWithE :: (b -> a -> c) -> Behavior a -> Event b -> Event c
- filterE :: (a -> Bool) -> Event a -> Event a
- whenE :: Behavior Bool -> Event a -> Event a
- filterWhenE :: Behavior (a -> Bool) -> Event a -> Event a
- whenCondE :: Behavior a -> (a -> Bool) -> Event b -> Event a
- constE :: a -> Event b -> Event a
- feedbackB :: a -> Behavior a -> BehaviorGen a
- genToE :: (a -> BehaviorGen b) -> Event a -> Event (Behavior b)
- joinE :: Event (Event a) -> Behavior (Event a)
- condChangeE :: Eq a => (a -> a -> Bool) -> a -> Behavior a -> Event b -> Behavior (Event a)
- changeE :: Eq a => a -> Behavior a -> Event b -> Behavior (Event a)

# Documentation

Continuous time functions.

type BehaviorGen a = Behavior (Behavior a)Source

Time functions with an additional time parameter, corresponding to a starting point.

runBehavior :: Behavior b -> IO bSource

Gets the current value of the `Behavior`

.

mkE :: IO (a -> IO (), Event a)Source

Creates a new `Event`

. Calling the returned action fires the event.

liftBG :: Behavior a -> BehaviorGen aSource

bindBG :: (Behavior a -> BehaviorGen b) -> BehaviorGen a -> BehaviorGen bSource

elapsedTimeB :: BehaviorGen NominalDiffTimeSource

A `BehaviorGen`

which gives the time from the starting point, in seconds.

elapsedTimeNumB :: Fractional a => BehaviorGen aSource

A `BehaviorGen`

which gives the time from the starting point, in seconds.

dswitchB :: Behavior a -> Event (a -> Behavior a) -> BehaviorGen aSource

A `BehaviorGen`

which mirrors the given `Behavior`

from the starting point, and switches to the
new behaviors (parametrized by the last value before the switch) given by the `Event`

.

stepB :: a -> Event a -> BehaviorGen aSource

accumB :: a -> Event (a -> a) -> BehaviorGen aSource

genIntegralB :: (Num t, Num a, Num b) => ((t, a) -> (t, a) -> b -> b) -> Event x -> Behavior t -> b -> Behavior a -> BehaviorGen bSource

trapIntegralB :: (Eq a, Fractional a) => Event x -> Behavior a -> a -> Behavior a -> BehaviorGen aSource

snapshotWithE :: (b -> a -> c) -> Behavior a -> Event b -> Event cSource

feedbackB :: a -> Behavior a -> BehaviorGen aSource