reactive-0.8.8: Simple foundation for functional reactive programmingSource codeContentsIndex
FRP.Reactive.Internal.Future
Stabilityexperimental
Maintainerconal@conal.net
Contents
Time & futures
Description
Representation of future values
Synopsis
type Time t = Max (AddBounds t)
newtype FutureG t a = Future {
unFuture :: (Time t, a)
}
inFuture :: ((Time t, a) -> (Time t', b)) -> FutureG t a -> FutureG t' b
inFuture2 :: ((Time t, a) -> (Time t', b) -> (Time t', c)) -> FutureG t a -> FutureG t' b -> FutureG t' c
runF :: Ord t => Sink t -> FutureG t (IO a) -> IO a
Time & futures
type Time t = Max (AddBounds t)Source
Time used in futures. The parameter t can be any Ord type. The added bounds represent -Infinity and +Infinity. Pure values have time minBound (-Infinity), while never-occurring futures have time maxBound (+Infinity).
newtype FutureG t a Source
A future value of type a with time type t. Simply a time/value pair. Particularly useful with time types that have non-flat structure.
Constructors
Future
unFuture :: (Time t, a)
show/hide Instances
Ord t => Monad (FutureG t)
Functor (FutureG t)
Ord t => Applicative (FutureG t)
(Show t, Show a) => Show (FutureG t a)
(Arbitrary t, Arbitrary a) => Arbitrary (FutureG t a)
Ord t => Monoid (FutureG t a)
(EqProp t, Eq t, EqProp a) => EqProp (FutureG t a)
inFuture :: ((Time t, a) -> (Time t', b)) -> FutureG t a -> FutureG t' bSource
Apply a unary function within the FutureG representation.
inFuture2 :: ((Time t, a) -> (Time t', b) -> (Time t', c)) -> FutureG t a -> FutureG t' b -> FutureG t' cSource
Apply a binary function within the FutureG representation.
runF :: Ord t => Sink t -> FutureG t (IO a) -> IO aSource
Run a future in the current thread. Use the given time sink to sync time, i.e., to wait for an output time before performing the action.
Produced by Haddock version 2.3.0