heftia-effects-0.5.0.0: higher-order algebraic effects done right
Copyright(c) 2023 Sayo Koyoneda
LicenseMPL-2.0 (see the LICENSE file)
Maintainer[email protected]
Safe HaskellNone
LanguageGHC2021

Control.Monad.Hefty.Reader

Description

Interpreters for the Reader effects.

Synopsis

Documentation

runReader :: forall r (eh :: [(Type -> Type) -> Type -> Type]) (ef :: [Type -> Type]). r -> Eff (Local r ': eh) (Ask r ': ef) ~> Eff eh ef Source #

Interpret the Ask/Local effects.

runAsk :: forall r (ef :: [Type -> Type]) (eh :: [EffectH]). r -> Eff eh (Ask r ': ef) ~> Eff eh ef Source #

Interpret the Ask effect.

runLocal :: forall r (eh :: [(Type -> Type) -> Type -> Type]) (ef :: [EffectF]). Ask r <| ef => Eff (Local r ': eh) ef ~> Eff eh ef Source #

Interpret the Local effect.

elabLocal :: forall r (eh :: [EffectH]) (ef :: [EffectF]). Ask r <| ef => Local r ~~> Eff eh ef Source #

A elaborator function for the Local effect.