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

Modulelinear-base-0.4.0Haskell2010

Control.Functor.Linear.Internal.Reader

  • 2 types
  • 10 values
newtypenewtype ReaderT r (m :: Type -> Type) a
#

A linear reader monad transformer. This reader monad requires that use of the read-only state is explict.

The monad instance requires that r be Dupable. This means that you should use the linear reader monad just like the non-linear monad, except that the type system ensures that you explicity use or discard the read-only state (with the Consumable instance).

Constructors

Instances6MonadTrans, Monad, Functor, Applicative
valuerunReaderT :: ReaderT r m a %1 -> r %1 -> m a
#

Provide an intial read-only state and run the monadic computation in a reader monad transformer

Orphan instances

4 instances