Closed SheetKey closed 1 year ago
Dumb question should have given it more thought. Just need to instantiate HoistClock
It's a good question, thanks for asking! I've ended up this train of thoughts myself before a few times, and with the current code base, HoistClock
(or rather LiftClock
in your case) is the best choice.
If not generalizing Millisecond n to use MonadIO would be handy.
Yes it would. It doesn't work as a RescaledClockS
as you've seen, so it would have to be implemented directly, as a singleton. Which is probably still worth it.
I am working on some things with signal network control flow via
ExceptT
and have run into some troubles working withMillisecond
clocks.Here I get errors that there is no instance for
(Clock (ExceptT e IO) Second)
. I tried this as wellWhich has the same error. I tried using
IOClock
, but then I don't know how to also lift that clock and schedule data intoMonadIO
.Is there a way to do this that I'm missing?
If not generalizing
Millisecond n
to useMonadIO
would be handy. I tried changing it tohowever the clock instance will not work since it cannot verify that for
Clock m1 (Millisecond n)
andRescaledCLockS m2 (FixedStep n) UTCTime Bool)
,m1=m2
. Changing the signature ofMillisecond n
toMillisecond m n
works but is a rather major change.This seems possibly related to #61 and #62.