data-effects-0.3.0.1: A basic framework for effect systems based on effects represented by GADTs.
Copyright(c) 2023-2024 Sayo Koyoneda
LicenseMPL-2.0 (see the file LICENSE)
Maintainer[email protected]
Safe HaskellNone
LanguageGHC2021

Data.Effect.Unlift

Description

Realizes unliftio in the form of higher-order effects.

Documentation

data UnliftBase (b :: Type -> Type) (f :: Type -> Type) a where Source #

Constructors

WithRunInBase :: forall (f :: Type -> Type) (b :: Type -> Type) a. ((forall x. f x -> b x) -> b a) -> UnliftBase b f a 

Instances

Instances details
() => HFunctor (UnliftBase b) Source # 
Instance details

Defined in Data.Effect.Unlift

Methods

hfmap :: forall (f :: Type -> Type) (g :: Type -> Type). (f :-> g) -> UnliftBase b f :-> UnliftBase b g #

withRunInBase :: forall b a f. SendHOE (UnliftBase b) f => ((forall x. f x -> b x) -> b a) -> f a Source #

withRunInBase' :: forall {k} (tag :: k) b a f. SendHOE (TagH (UnliftBase b) tag) f => ((forall x. f x -> b x) -> b a) -> f a Source #

withRunInBase'' :: forall {k} (key :: k) b a f. SendHOEBy key (UnliftBase b) f => ((forall x. f x -> b x) -> b a) -> f a Source #

pattern WithRunInIO :: ((f ~> IO) -> IO a) -> UnliftIO f a Source #

withRunInIO :: UnliftIO <<: f => ((f ~> IO) -> IO a) -> f a Source #

withRunInIO' :: forall {k} (tag :: k) f a. (UnliftIO ## tag) <<: f => ((f ~> IO) -> IO a) -> f a Source #

withRunInIO'' :: forall {k} (key :: k) f a. SendHOEBy key UnliftIO f => ((f ~> IO) -> IO a) -> f a Source #