rhine-0.9: Functional Reactive Programming with type-level clocks
Safe HaskellSafe-Inferred
LanguageHaskell2010

FRP.Rhine.Clock.Proxy

Synopsis

Documentation

data ClockProxy cl where Source #

Witnesses the structure of a clock type, in particular whether SequentialClocks or ParallelClocks are involved.

Constructors

LeafProxy :: (cl ~ In cl, cl ~ Out cl) => ClockProxy cl 
SequentialProxy :: ClockProxy cl1 -> ClockProxy cl2 -> ClockProxy (SequentialClock m cl1 cl2) 
ParallelProxy :: ClockProxy clL -> ClockProxy clR -> ClockProxy (ParallelClock m clL clR) 

inTag :: ClockProxy cl -> Tag cl -> Maybe (Tag (In cl)) Source #

Return the incoming tag, assuming that the incoming clock is ticked, and Nothing otherwise.

outTag :: ClockProxy cl -> Tag cl -> Maybe (Tag (Out cl)) Source #

Return the incoming tag, assuming that the outgoing clock is ticked, and Nothing otherwise.

class GetClockProxy cl where Source #

Clocks should be able to automatically generate a proxy for themselves.

Minimal complete definition

Nothing

Methods

getClockProxy :: ClockProxy cl Source #

default getClockProxy :: (cl ~ In cl, cl ~ Out cl) => ClockProxy cl Source #

Instances

Instances details
GetClockProxy Busy Source # 
Instance details

Defined in FRP.Rhine.Clock.Realtime.Busy

GetClockProxy StdinClock Source # 
Instance details

Defined in FRP.Rhine.Clock.Realtime.Stdin

GetClockProxy (FixedStep n) Source # 
Instance details

Defined in FRP.Rhine.Clock.FixedStep

GetClockProxy (Periodic v) Source # 
Instance details

Defined in FRP.Rhine.Clock.Periodic

GetClockProxy (PureAudioClock rate) Source # 
Instance details

Defined in FRP.Rhine.Clock.Realtime.Audio

GetClockProxy (EventClock event) Source # 
Instance details

Defined in FRP.Rhine.Clock.Realtime.Event

GetClockProxy (Millisecond n) Source # 
Instance details

Defined in FRP.Rhine.Clock.Realtime.Millisecond

GetClockProxy cl => GetClockProxy (RescaledClock cl time) Source # 
Instance details

Defined in FRP.Rhine.Clock.Proxy

GetClockProxy (AudioClock rate bufferSize) Source # 
Instance details

Defined in FRP.Rhine.Clock.Realtime.Audio

Methods

getClockProxy :: ClockProxy (AudioClock rate bufferSize) Source #

GetClockProxy (SelectClock cl a) Source # 
Instance details

Defined in FRP.Rhine.Clock.Select

GetClockProxy cl => GetClockProxy (HoistClock m1 m2 cl) Source # 
Instance details

Defined in FRP.Rhine.Clock.Proxy

GetClockProxy cl => GetClockProxy (RescaledClockM m cl time) Source # 
Instance details

Defined in FRP.Rhine.Clock.Proxy

(GetClockProxy cl1, GetClockProxy cl2) => GetClockProxy (ParallelClock m cl1 cl2) Source # 
Instance details

Defined in FRP.Rhine.Clock.Proxy

(GetClockProxy cl1, GetClockProxy cl2) => GetClockProxy (SequentialClock m cl1 cl2) Source # 
Instance details

Defined in FRP.Rhine.Clock.Proxy

GetClockProxy cl => GetClockProxy (RescaledClockS m cl time tag) Source # 
Instance details

Defined in FRP.Rhine.Clock.Proxy

Methods

getClockProxy :: ClockProxy (RescaledClockS m cl time tag) Source #

class ToClockProxy a where Source #

Extract a clock proxy from a type.

Minimal complete definition

Nothing

Associated Types

type Cl a :: Type Source #

Methods

toClockProxy :: a -> ClockProxy (Cl a) Source #

default toClockProxy :: GetClockProxy (Cl a) => a -> ClockProxy (Cl a) Source #

Instances

Instances details
GetClockProxy cl => ToClockProxy (SN m cl a b) Source # 
Instance details

Defined in FRP.Rhine.SN

Associated Types

type Cl (SN m cl a b) Source #

Methods

toClockProxy :: SN m cl a b -> ClockProxy (Cl (SN m cl a b)) Source #

GetClockProxy cl => ToClockProxy (Rhine m cl a b) Source # 
Instance details

Defined in FRP.Rhine.Type

Associated Types

type Cl (Rhine m cl a b) Source #

Methods

toClockProxy :: Rhine m cl a b -> ClockProxy (Cl (Rhine m cl a b)) Source #