Closed ners closed 3 months ago
Thanks a lot! This is a useful addition.
This clock does not actually run in MonadIO because it is modelled after FRP.Rhine.Clock.Realtime.Busy, which runs in IO. We should probably make both of them MonadIO in the future.
I agree, we should, and indeed I think Never
can already be in MonadIO
. Busy
can be changed later.
Have you seen https://github.com/turion/rhine/pull/287? I think this will interplay really nicely with Never
!
As seen in: https://github.com/ners/rhine-linux/blob/master/kitchen-sink/Main.hs
Some clocks may fail to initialise (e.g. because they depend on missing external resources), but we would like to recover gracefully by replacing them with a clock that never ticks.
And so we introduce a clock that never ticks, but can produce anything: