Module

Control.Comonad.Env.Trans

Package
purescript-transformers
Repository
purescript/purescript-transformers

This module defines the environment comonad transformer, EnvT.

#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

#runEnvT Source

runEnvT :: forall a w e. EnvT e w a -> Tuple e (w a)

Unwrap a value in the EnvT comonad.

#withEnvT Source

withEnvT :: forall a w e2 e1. (e1 -> e2) -> EnvT e1 w a -> EnvT e2 w a

Change the environment type in an EnvT context.

#mapEnvT Source

mapEnvT :: forall b a w2 w1 e. (w1 a -> w2 b) -> EnvT e w1 a -> EnvT e w2 b

Change the underlying comonad and data type in an EnvT context.