comonad-transformers-0.3: Haskell 98 comonad transformers

Portabilityportable
Stabilityprovisional
MaintainerEdward Kmett <ekmett@gmail.com>

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

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

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