rhine-0.5.1.0: Functional Reactive Programming with type-level clocks

Safe HaskellNone
LanguageHaskell2010

FRP.Rhine.Clock.FixedStep

Description

Implements pure clocks ticking at every multiple of a fixed number of steps, and a deterministic schedule for such clocks.

Synopsis

Documentation

data FixedStep (n :: Nat) where Source #

A pure (side effect free) clock with fixed step size, i.e. ticking at multiples of n. The tick rate is in the type signature, which prevents composition of signals at different rates.

Constructors

FixedStep :: KnownNat n => FixedStep n 
Instances
Monad m => Clock m (FixedStep n) Source # 
Instance details

Defined in FRP.Rhine.Clock.FixedStep

Associated Types

type Time (FixedStep n) :: Type Source #

type Tag (FixedStep n) :: Type Source #

type Time (FixedStep n) Source # 
Instance details

Defined in FRP.Rhine.Clock.FixedStep

type Tag (FixedStep n) Source # 
Instance details

Defined in FRP.Rhine.Clock.FixedStep

type Tag (FixedStep n) = ()

stepsize :: FixedStep n -> Integer Source #

Extract the type-level natural number as an integer.

type Count = FixedStep 1 Source #

A singleton clock that counts the ticks.

scheduleFixedStep :: Monad m => Schedule m (FixedStep n1) (FixedStep n2) Source #

Two FixedStep clocks can always be scheduled without side effects.