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