Safe Haskell | None |
---|---|

Language | Haskell2010 |

## Synopsis

- data Forklift r = Forklift {}
- runViaForklift :: LastMember (Lift IO) r => InChan (Forklift r) -> Sem r a -> Sem '[Lift IO] a
- runViaForklift_b :: LastMember (Lift IO) r => InChan (Forklift r) -> Sem r a -> Sem '[Lift IO] a
- withLowerToIO :: LastMember (Lift IO) r => ((forall x. Sem r x -> IO x) -> IO () -> IO a) -> Sem r a

# Documentation

A promise for interpreting an effect of the union `r`

in another thread.

*Since: 0.5.0.0*

runViaForklift :: LastMember (Lift IO) r => InChan (Forklift r) -> Sem r a -> Sem '[Lift IO] a Source #

A strategy for automatically interpreting an entire stack of effects by just shipping them off to some other interpretation context.

*Since: 0.5.0.0*

runViaForklift_b :: LastMember (Lift IO) r => InChan (Forklift r) -> Sem r a -> Sem '[Lift IO] a Source #

:: LastMember (Lift IO) r | |

=> ((forall x. Sem r x -> IO x) -> IO () -> IO a) | A lambda that takes the lowering function, and a finalizing |

-> Sem r a |

Run an effect stack all the way down to `IO`

by running it in a new
thread, and temporarily turning the current thread into an event poll.

This function creates a thread, and so should be compiled with `-threaded`

.

*Since: 0.5.0.0*