polysemy-zoo-0.8.1.0: Experimental, user-contributed effects and interpreters for polysemy
Safe HaskellNone
LanguageHaskell2010

Polysemy.Reader.Compact

Synopsis

Documentation

runReaderWithCompacted :: forall r i a. Member (Embed IO) r => i -> Sem (Reader i ': r) a -> Sem r a Source #

Run a Reader effect by compacting a value; otherwise behaves as normal. Useful for Reader effects which provide a large structure.

runReaderWithExistingCompacted :: forall r i a. Member (Embed IO) r => Compact i -> Sem (Reader i ': r) a -> Sem r a Source #

Run a Reader effect with a value in a compact region. Will not add local values to the existing region, but will create a new region for it.