Copyright | (c) 2023 Yamada Ryo |
---|---|
License | MPL-2.0 (see the file LICENSE) |
Maintainer | ymdfield@outlook.jp |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | GHC2021 |
Data.Effect.Provider
Description
This module provides the Provider
effect, comes
from Effectful.Provider
in the effectful
package.
Documentation
data Provider' c i ctx e (f :: Type -> Type) (a :: Type) where Source #
data ProviderKey Source #
provide :: forall (i :: Type) (c :: (Type -> Type) -> Constraint) (e :: (Type -> Type) -> Constraint) (a :: Type) (ctx :: Type -> Type) f. SendSigBy ProviderKey (Provider' c i ctx e) f => i -> (forall (g :: Type -> Type). (c g, e g) => (forall (x :: Type). f x -> g x) -> g a) -> f (ctx a) Source #
provide'' :: forall key (i :: Type) (c :: (Type -> Type) -> Constraint) (e :: (Type -> Type) -> Constraint) (a :: Type) (ctx :: Type -> Type) f. SendSigBy key (Provider' c i ctx e) f => i -> (forall (g :: Type -> Type). (c g, e g) => (forall (x :: Type). f x -> g x) -> g a) -> f (ctx a) Source #
provide' :: forall tag (i :: Type) (c :: (Type -> Type) -> Constraint) (e :: (Type -> Type) -> Constraint) (a :: Type) (ctx :: Type -> Type) f. SendSig (TagH (Provider' c i ctx e) tag) f => i -> (forall (g :: Type -> Type). (c g, e g) => (forall (x :: Type). f x -> g x) -> g a) -> f (ctx a) Source #
provide'_ :: forall (i :: Type) (c :: (Type -> Type) -> Constraint) (e :: (Type -> Type) -> Constraint) (a :: Type) (ctx :: Type -> Type) f. SendSig (Provider' c i ctx e) f => i -> (forall (g :: Type -> Type). (c g, e g) => (forall (x :: Type). f x -> g x) -> g a) -> f (ctx a) Source #
type MonadProvider' = Provider' Monad Source #
type MonadProvider i ctx e = Provider Monad i ctx e Source #
type ApplicativeProvider i ctx e = Provider Applicative i ctx e Source #
mprovide :: forall e i ctx f a. SendSigBy ProviderKey (MonadProvider' i ctx e) f => i -> (forall g. (Monad g, e g) => (f ~> g) -> g a) -> f (ctx a) Source #
aprovide :: forall e i ctx f a. SendSigBy ProviderKey (ApplicativeProvider' i ctx e) f => i -> (forall h. (Applicative h, e h) => (f ~> h) -> h a) -> f (ctx a) Source #