HORIZON HASKELLDocslts/ghc-9.14.x45dd5372026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · 45dd537 · 2026-10-11

Moduleeffectful-core-2.7.1.2GHC2021

Effectful.Reader.Dynamic

The dynamically dispatched variant of the Reader effect.

Note: unless you plan to change interpretations at runtime or you need the Control.Monad.Reader.MonadReader instance for compatibility with existing code, it's recommended to use the statically dispatched variant, i.e. Effectful.Reader.Static.

  • 1 type
  • 5 values

Effect

1 declaration

Handlers

valuewithReader
  1. :: HasCallStack
  2. => (r1 -> r2)

    The function to modify the environment.

  3. -> Eff (Reader r2 ': es) a

    Computation to run in the modified environment.

  4. -> Eff (Reader r1 ': es) a
#

Deprecated. withReader doesn't work correctly for all potential interpreters

Execute a computation in a modified environment.

Operations