data-effects-0.1.2.0: A basic framework for effect systems based on effects represented by GADTs.
Copyright(c) 2023 Yamada Ryo
LicenseMPL-2.0 (see the file LICENSE)
Maintainerymdfield@outlook.jp
Stabilityexperimental
Portabilityportable
Safe HaskellSafe-Inferred
LanguageGHC2021

Data.Effect.Reader

Description

 

Documentation

data Ask r (a :: Type) where Source #

Constructors

Ask :: Ask r r 

data Local r f (a :: Type) where Source #

Constructors

Local :: (r -> r) -> f a -> Local r f a 

Instances

Instances details
() => HFunctor (Local r) Source # 
Instance details

Defined in Data.Effect.Reader

Methods

hfmap :: forall (f :: Type -> Type) (g :: Type -> Type). (f :-> g) -> Local r f :-> Local r g #

type LAsk r = LiftIns (Ask r) Source #

local'' :: forall key (r :: Type) (a :: Type) f. SendSigBy key (Local r) f => (r -> r) -> f a -> f a Source #

local' :: forall tag (r :: Type) (a :: Type) f. SendSig (TagH (Local r) tag) f => (r -> r) -> f a -> f a Source #

local :: forall (r :: Type) (a :: Type) f. SendSig (Local r) f => (r -> r) -> f a -> f a Source #

pattern LAsk :: () => (a ~ r, ()) => LiftIns (Ask r) f a Source #

ask'' :: forall key (r :: Type) f. SendInsBy key (Ask r) f => f r Source #

ask' :: forall tag (r :: Type) f. SendIns (Tag (Ask r) tag) f => f r Source #

ask :: forall (r :: Type) f. SendIns (Ask r) f => f r Source #

asks :: (Ask r <: f, Functor f) => (r -> a) -> f a Source #