comonad-transformers-2.0.3: Comonad transformers

Portabilityportable
Stabilityprovisional
MaintainerEdward Kmett <ekmett@gmail.com>
Safe HaskellSafe-Infered

Control.Comonad.Trans.Env.Strict

Contents

Description

The environment comonad transformer (aka coreader). This adds an extra value that can be accessed in the environment.

Left adjoint to the reader comonad.

Synopsis

The strict environment comonad

env :: e -> a -> Env e aSource

runEnv :: Env e a -> (e, a)Source

The strict environment comonad transformer

data EnvT e w a Source

Constructors

EnvT e (w a) 

Instances

ComonadTrans (EnvT e) 
ComonadHoist (EnvT e) 
Functor w => Functor (EnvT e w) 
(Typeable s, Typeable1 w) => Typeable1 (EnvT s w) 
Foldable w => Foldable (EnvT e w) 
Traversable w => Traversable (EnvT e w) 
Comonad w => Comonad (EnvT e w) 
Extend w => Extend (EnvT e w) 
(Semigroup e, Apply w) => Apply (EnvT e w) 
(Data e, Typeable1 w, Data (w a), Data a) => Data (EnvT e w a) 
(Typeable s, Typeable1 w, Typeable a) => Typeable (EnvT s w a) 

runEnvT :: EnvT e w a -> (e, w a)Source

lowerEnvT :: EnvT e w a -> w aSource

Combinators

ask :: EnvT e w a -> eSource

asks :: (e -> f) -> EnvT e w a -> fSource

local :: (e -> e) -> EnvT e w a -> EnvT e w aSource