HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulecomonad-5.0.9Haskell2010

Control.Comonad.Env

The Env comonad (aka the Coreader, Environment, or Product comonad)

A co-Kleisli arrow in the Env comonad is isomorphic to a Kleisli arrow in the reader monad.

(a -> e -> m) ~ (a, e) -> m ~ Env e a -> m

  • 2 types
  • 1 class
  • 5 values
  • Packagecomonad-5.0.9
  • Exports8
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceEnv.hs

ComonadEnv class

3 declarations
classclass Comonad w => ComonadEnv e (w :: Type -> Type) | w -> e where
#

Methods

  • ask :: w a -> e
Instances6ComonadEnv
valuelocal :: (e -> e') -> EnvT e w a -> EnvT e' w a
#

Modifies the environment using the specified function.

The Env comonad

3 declarations
valueenv :: e -> a -> Env e a
#

Create an Env using an environment and a value

The EnvT comonad transformer

2 declarations
datadata EnvT e (w :: Type -> Type) a
#

Constructors

Instances12ComonadEnv, ComonadStore, ComonadTraced, ComonadTrans, ComonadHoist, Functor, …

Re-exported modules

0 declarations