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

Moduleeffectful-core-2.3.0.1Haskell2010

Effectful.Reader.Static

Support for access to a read only value of a particular type.

  • 1 type
  • 5 values

Effect

1 declaration
datadata Reader r (a :: Type -> Type) b
#

Provide access to a strict (WHNF), thread local, read only value of type r.

Instances2DispatchOf, StaticRep

Handlers

valuerunReader
  1. :: r

    The initial environment.

  2. -> Eff (Reader r ': es) a
  3. -> Eff es a
#

Run a Reader effect with the given initial environment.

valuewithReader
  1. :: (r1 -> r2)

    The function to modify the environment.

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

    Computation to run in the modified environment.

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

Execute a computation in a modified environment.

Operations

valueask :: Reader r :> es => Eff es r
#

Fetch the value of the environment.

valueasks
  1. :: Reader r :> es
  2. => (r -> a)

    The function to apply to the environment.

  3. -> Eff es a
#

Retrieve a function of the current environment.

asks f ≡ f <$> ask