AsyncRattus-0.2.0.1: An asynchronous modal FRP language
Safe HaskellSafe-Inferred
LanguageHaskell2010

AsyncRattus.Future

Description

Programming with futures.

Synopsis

Documentation

data F a Source #

F a will produces a value of type a after zero or more ticks of some clocks

Constructors

Now !a 
Wait !(O (F a)) 

Instances

Instances details
Producer p a => Producer (F p) a Source # 
Instance details

Defined in AsyncRattus.Future

Methods

getCurrent :: F p -> Maybe' a Source #

getNext :: F p -> (forall q. Producer q a => O q -> b) -> b Source #

data SigF a Source #

SigF a is a signal of values of type a. In contrast to Sig, SigF supports the filter and filterMap functions.

Constructors

!a :>: !(O (F (SigF a))) 

Instances

Instances details
Producer (SigF a) a Source # 
Instance details

Defined in AsyncRattus.Future

Methods

getCurrent :: SigF a -> Maybe' a Source #

getNext :: SigF a -> (forall q. Producer q a => O q -> b) -> b Source #

mkSigF :: Box (O a) -> F (SigF a) Source #

mkSigF' :: Box (O a) -> O (F (SigF a)) Source #

current :: SigF a -> a Source #

Get the current value of a signal.

future :: SigF a -> O (F (SigF a)) Source #

Get the future the signal.

bindF :: F a -> Box (a -> F b) -> F b Source #

mapF :: Box (a -> b) -> F a -> F b Source #

sync :: O (F a) -> O (F b) -> O (F a :* F b) Source #

syncF :: (Stable a, Stable b) => F a -> F b -> F (a :* b) Source #

switchAwait :: F (SigF a) -> F (SigF a) -> F (SigF a) Source #

switch :: SigF a -> F (SigF a) -> SigF a Source #

switchS :: Stable a => SigF a -> F (a -> SigF a) -> SigF a Source #

filterMap :: Box (a -> Maybe' b) -> SigF a -> F (SigF b) Source #

filterMapAwait :: Box (a -> Maybe' b) -> F (SigF a) -> F (SigF b) Source #

filterAwait :: Box (a -> Bool) -> F (SigF a) -> F (SigF a) Source #

filter :: Box (a -> Bool) -> SigF a -> F (SigF a) Source #

trigger :: Stable b => Box (a -> b -> c) -> SigF a -> SigF b -> SigF c Source #

triggerAwait :: Stable b => Box (a -> b -> c) -> F (SigF a) -> SigF b -> F (SigF c) Source #

map :: Box (a -> b) -> SigF a -> SigF b Source #

mapAwait :: Box (a -> b) -> F (SigF a) -> F (SigF b) Source #

zipWith :: (Stable a, Stable b) => Box (a -> b -> c) -> SigF a -> SigF b -> SigF c Source #

zipWithAwait :: (Stable a, Stable b) => Box (a -> b -> c) -> a -> b -> F (SigF a) -> F (SigF b) -> F (SigF c) Source #

fromSig :: Sig a -> SigF a Source #

scan :: Stable b => Box (b -> a -> b) -> b -> SigF a -> SigF b Source #

scanAwait :: Stable b => Box (b -> a -> b) -> b -> F (SigF a) -> F (SigF b) Source #