Safe Haskell | None |
---|

# Task monad transformer

Task monad transformer.

MonadReader s m => MonadReader s (TaskT e m) | |

MonadState s m => MonadState s (TaskT e m) | |

Monad m => MonadTask e (TaskT e m) | |

MonadTrans (TaskT e) | |

Monad m => Monad (TaskT e m) | |

Functor (TaskT e m) | |

Applicative (TaskT e m) | |

MonadIO m => MonadIO (TaskT e m) |

# Trace of a base monad

A `Trace m e`

represents the control flow of a mult-threaded task monad
defined over a base monad `m`

and event type `e`

.

runTrace :: Monad m => m (Trace m e) -> m ()Source

`runTrace`

runs a trace to its completion in the base monad with a simple
round-robin scheduler.

# Task functions

taskToTrace :: Monad m => TaskT e m a -> m (Trace m e)Source

`tasktoTrace`

CPS-converts a task monad into a trace in its base monad.