polysemy-1.8.0.0: Higher-order, low-boilerplate free monads.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Polysemy.Reader

Synopsis

Effect

data Reader i m a where Source #

An effect corresponding to ReaderT.

Constructors

Ask :: Reader i m i 
Local :: (i -> i) -> m a -> Reader i m a 

Actions

ask :: forall i r. Member (Reader i) r => Sem r i Source #

asks :: forall i j r. Member (Reader i) r => (i -> j) -> Sem r j Source #

local :: forall i r a. Member (Reader i) r => (i -> i) -> Sem r a -> Sem r a Source #

Interpretations

runReader :: i -> Sem (Reader i ': r) a -> Sem r a Source #

Run a Reader effect with a constant value.

Interpretations for Other Effects

inputToReader :: Member (Reader i) r => Sem (Input i ': r) a -> Sem r a Source #

Transform an Input effect into a Reader effect.

Since: 1.0.0.0