Safe Haskell | None |
---|---|
Language | Haskell2010 |
Internal helpers for taking asynchronous machine steps.
- type MachineStep m k o = Step k o (MachineT m k o)
- type AsyncStep m k o = Async (StM m (MachineStep m k o))
- awaitStep :: (a -> d) -> k' a -> d -> (d -> r) -> Step k' b r
- asyncRun :: MonadBaseControl IO m => MachineT m k o -> m (AsyncStep m k o)
- stepAsync :: forall m k k' a' d b. MonadBaseControl IO m => (forall c. k c -> k' c) -> AsyncStep m k a' -> (a' -> d) -> d -> d -> (AsyncStep m k a' -> d -> MachineT m k' b) -> MachineT m k' b
- asyncEncased :: MonadBaseControl IO m => (AsyncStep m k1 o1 -> MachineT m k o) -> MachineT m k1 o1 -> MachineT m k o
- asyncAwait :: MonadBaseControl IO m => (a -> MachineT m k o) -> k' a -> MachineT m k o -> (AsyncStep m k o -> MachineT m k1 o1) -> m (Step k' b (MachineT m k1 o1))
Documentation
type MachineStep m k o = Step k o (MachineT m k o) Source
Slightly more compact notation for a Step
.
type AsyncStep m k o = Async (StM m (MachineStep m k o)) Source
Compact notation for a Step
taken asynchronously.
asyncRun :: MonadBaseControl IO m => MachineT m k o -> m (AsyncStep m k o) Source
Run one step of a machine as an Async
operation.
stepAsync :: forall m k k' a' d b. MonadBaseControl IO m => (forall c. k c -> k' c) -> AsyncStep m k a' -> (a' -> d) -> d -> d -> (AsyncStep m k a' -> d -> MachineT m k' b) -> MachineT m k' b Source
Satisfy a downstream Await by blocking on an upstream step.
asyncEncased :: MonadBaseControl IO m => (AsyncStep m k1 o1 -> MachineT m k o) -> MachineT m k1 o1 -> MachineT m k o Source