Copyright | (c) 2023-2024 Sayo Koyoneda |
---|---|
License | MPL-2.0 (see the file LICENSE) |
Maintainer | ymdfield@outlook.jp |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | GHC2021 |
Data.Effect.Provider
Description
This module provides the Provider
effect, like Effectful.Provider
in the effectful
package.
Documentation
data Provider' (ctx :: Type -> Type) i (b :: Type -> Type) (f :: Type -> Type) a where Source #
provide :: forall i b a ctx f. SendHOE (Provider' ctx i b) f => i -> ((forall x. f x -> b x) -> b a) -> f (ctx a) Source #
provide' :: forall {k} (tag :: k) i b a ctx f. SendHOE (TagH (Provider' ctx i b) tag) f => i -> ((forall x. f x -> b x) -> b a) -> f (ctx a) Source #
provide'' :: forall {k} (key :: k) i b a ctx f. SendHOEBy key (Provider' ctx i b) f => i -> ((forall x. f x -> b x) -> b a) -> f (ctx a) Source #
data ProviderKey (ctx :: k) (i :: k1) Source #
type Provider (ctx :: Type -> Type) i (b :: Type -> Type) = ProviderKey ctx i ##> Provider' ctx i b Source #