| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Polysemy.Final.Async
Synopsis
- module Polysemy.Async
- module Polysemy.Final
- runAsyncFinal :: Member (Final IO) r => Sem (Async ': r) a -> Sem r a
Documentation
module Polysemy.Async
module Polysemy.Final
runAsyncFinal :: Member (Final IO) r => Sem (Async ': r) a -> Sem r a Source #
Run an Async effect through final IO
This can be used as an alternative to lowerAsync.
Beware: Effects that aren't interpreted in terms of IO
will have local state semantics in regards to Async effects
interpreted this way. See interpretFinal.
Notably, unlike asyncToIO, this is not consistent with
State unless runStateInIORef is used.
State that seems like it should be threaded globally throughout the Async
will not be.
Prefer asyncToIO unless its unsafe or inefficient in the context of your
application.