polysemy-zoo-0.4.0.0: Experimental, user-contributed effects and interpreters for polysemy

Safe HaskellNone
LanguageHaskell2010

Polysemy.Final.Async

Synopsis

Documentation

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 runAsyncInIO.

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 runAsync, 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 runAsync unless its unsafe or inefficient in the context of your application.