classy-effects-0.1.0.0: An interface for a handler-independent, typeclass-based effect system.
Copyright(c) 2023 Yamada Ryo
LicenseMPL-2.0 (see the file LICENSE)
Maintainerymdfield@outlook.jp
Stabilityexperimental
Portabilityportable
Safe HaskellSafe-Inferred
LanguageGHC2021

Control.Effect.Class.Provider

Description

This module provides the Provider effect, comes from Effectful.Provider in the effectful package.

Documentation

class Provider c e i g (f :: Type -> Type) where Source #

Methods

provide :: i -> (forall h. (c h, e h) => (f ~> h) -> h a) -> f (g a) Source #

Instances

Instances details
SendSig (ProviderS c e i g) f => Provider c e i g (EffectsVia EffectDataHandler f) Source # 
Instance details

Defined in Control.Effect.Class.Provider

Methods

provide :: i -> (forall (h :: Type -> Type). (c h, e h) => (EffectsVia EffectDataHandler f ~> h) -> h a) -> EffectsVia EffectDataHandler f (g a) Source #

data ProviderS (c :: (Type -> Type) -> Constraint) (e :: (Type -> Type) -> Constraint) (i :: Type) (g :: Type -> Type) f (a :: Type) where Source #

Constructors

Provide :: forall c e i g f a. i -> (forall (h :: Type -> Type). (c h, e h) => (~>) f h -> h a) -> ProviderS c e i g f (g a) 

Instances

Instances details
HFunctor (ProviderS c e i g) Source # 
Instance details

Defined in Control.Effect.Class.Provider

Methods

hfmap :: forall (f :: Type -> Type) (g0 :: Type -> Type). (f :-> g0) -> ProviderS c e i g f :-> ProviderS c e i g g0 #

mprovide :: MonadProvider e i g f => i -> (forall h. (Monad h, e h) => (f ~> h) -> h a) -> f (g a) Source #

aprovide :: ApplicativeProvider e i g f => i -> (forall h. (Applicative h, e h) => (f ~> h) -> h a) -> f (g a) Source #