HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Moduleadjunctions-4.4.3Haskell2010

Control.Monad.Representable.Reader

Representable functors on Hask are all monads, because they are isomorphic to a Reader monad.

  • 2 types
  • 1 class
  • 3 values
  • Packageadjunctions-4.4.3
  • Exports6
  • LanguageHaskell2010
  • LicenceBSD-2-Clause
  • SourceReader.hs

Representable functor monad

2 declarations

Monad Transformer

4 declarations
newtypenewtype ReaderT (f :: Type -> Type) (m :: Type -> Type) b
#

Constructors

Instances18MonadReader, MonadWriter, MonadTrans, Monad, Functor, Applicative, …
classclass Monad m => MonadReader r (m :: Type -> Type) | m -> r where
#

See examples in Control.Monad.Reader. Note, the partially applied function type (->) r is a simple reader monad. See the instance declaration below.

Methods

  • ask :: m r

    Retrieves the monad environment.

  • local :: (r -> r) -> m a -> m a

    Executes a computation in a modified environment.

  • reader :: (r -> a) -> m a

    Retrieves a function of the current environment.

Instances27MonadReader, …