Module
Control.Comonad.Env
- Package
- purescript-transformers
- Repository
- purescript/purescript-transformers
This module defines the Env
comonad.
Re-exports from Control.Comonad.Env.Class
#ComonadEnv Source
class (ComonadAsk e w) <= ComonadEnv e w | w -> e where
The ComonadEnv
type class extends ComonadAsk
with a function
local f x
that allows the value of the local context to be modified for
the duration of the execution of action x
.
An implementation is provided for EnvT
.
Laws:
ask (local f x) = f (ask x)
extract (local _ x) = extract a
extend g (local f x) = extend (g <<< local f) x
Members
local :: forall a. (e -> e) -> w a -> w a
Instances
ComonadEnv e (Tuple e)
(Comonad w) => ComonadEnv e (EnvT e w)
#ask
ask :: forall e w a. ComonadAsk e w => w a -> e
#asks Source
asks :: forall w e2 e1. ComonadEnv e1 w => (e1 -> e2) -> w e1 -> e2
Get a value which depends on the environment.
Re-exports from Control.Comonad.Env.Trans
#EnvT Source
newtype EnvT e w a
The environment comonad transformer.
This comonad transformer extends the context of a value in the base comonad with a global environment of
type e
.
The ComonadEnv
type class describes the operations supported by this comonad.
Constructors
Instances
- Modules
- Control.
Comonad. Env - Control.
Comonad. Env. Class - Control.
Comonad. Env. Trans - Control.
Comonad. Store - Control.
Comonad. Store. Class - Control.
Comonad. Store. Trans - Control.
Comonad. Traced - Control.
Comonad. Traced. Class - Control.
Comonad. Traced. Trans - Control.
Comonad. Trans. Class - Control.
Monad. Cont - Control.
Monad. Cont. Class - Control.
Monad. Cont. Trans - Control.
Monad. Error. Class - Control.
Monad. Except - Control.
Monad. Except. Trans - Control.
Monad. List. Trans - Control.
Monad. Maybe. Trans - Control.
Monad. RWS - Control.
Monad. RWS. Trans - Control.
Monad. Reader - Control.
Monad. Reader. Class - Control.
Monad. Reader. Trans - Control.
Monad. State - Control.
Monad. State. Class - Control.
Monad. State. Trans - Control.
Monad. Trans. Class - Control.
Monad. Writer - Control.
Monad. Writer. Class - Control.
Monad. Writer. Trans