Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Periodic clocks are defined by a stream of ticks with periodic time differences. They model subclocks of a fixed reference clock. The time differences are supplied at the type level.
Documentation
data Periodic (v :: [Nat]) where Source #
A clock whose tick lengths cycle through
a (nonempty) list of type-level natural numbers.
E.g. Periodic '[1, 2]
ticks at times 1, 3, 4, 5, 7, 8, etc.
The waiting side effect is formal, in ScheduleT
.
You can use e.g. runScheduleIO
to produce an actual delay.
Instances
GetClockProxy (Periodic v) Source # | |
Defined in FRP.Rhine.Clock.Periodic getClockProxy :: ClockProxy (Periodic v) Source # | |
(Monad m, NonemptyNatList v) => Clock (ScheduleT Integer m) (Periodic v) Source # | |
type Tag (Periodic v) Source # | |
Defined in FRP.Rhine.Clock.Periodic | |
type Time (Periodic v) Source # | |
Defined in FRP.Rhine.Clock.Periodic |