Safe Haskell | None |
---|---|
Language | Haskell2010 |
Waiting for things to happen
Synopsis
- data Waiting r where
- WaitUntilSlot :: Slot -> Waiting Slot
- GetSlotConfig :: Waiting SlotConfig
- waitUntilSlot :: forall effs. Member Waiting effs => Slot -> Eff effs Slot
- waitUntilTime :: Member Waiting effs => POSIXTime -> Eff effs POSIXTime
- nextSlot :: Member Waiting effs => Eff effs Slot
- waitNSlots :: forall effs. Member Waiting effs => Natural -> Eff effs Slot
- waitNMilliSeconds :: forall effs. Member Waiting effs => DiffMilliSeconds -> Eff effs Slot
- handleWaiting :: forall effs effs2 a. Member (Yield (EmSystemCall effs2 EmulatorMessage a) (Maybe EmulatorMessage)) effs => SlotConfig -> Waiting ~> Eff effs
Documentation
WaitUntilSlot :: Slot -> Waiting Slot | |
GetSlotConfig :: Waiting SlotConfig |
waitUntilTime :: Member Waiting effs => POSIXTime -> Eff effs POSIXTime Source #
Wait until the slot where the given time falls into and return latest time we know has passed.
nextSlot :: Member Waiting effs => Eff effs Slot Source #
Wait until the beginning of the next slot, returning the new slot number.
waitNSlots :: forall effs. Member Waiting effs => Natural -> Eff effs Slot Source #
Wait for a number of slots
waitNMilliSeconds :: forall effs. Member Waiting effs => DiffMilliSeconds -> Eff effs Slot Source #
Convert the given n
milliseconds to a number of slots to wait.
Note: Currently, if n < length of a slot, then waitNMilliSeconds
has no
effect.
handleWaiting :: forall effs effs2 a. Member (Yield (EmSystemCall effs2 EmulatorMessage a) (Maybe EmulatorMessage)) effs => SlotConfig -> Waiting ~> Eff effs Source #