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

Control.Effect.Tag

Description

 
Synopsis

Documentation

newtype ViaTag tag (f :: Type -> Type) a Source #

A wrapper data type to represent sending an effect to the carrier f with the specified tag.

Constructors

ViaTag 

Fields

Instances

Instances details
SendInsBy key (ins # tag) f => SendInsBy (key :: k1) ins (ViaTag tag f) Source # 
Instance details

Defined in Control.Effect.Tag

Methods

sendInsBy :: ins a -> ViaTag tag f a Source #

(SendSigBy key (sig ## tag) f, HFunctor sig) => SendSigBy (key :: k1) sig (ViaTag tag f) Source # 
Instance details

Defined in Control.Effect.Tag

Methods

sendSigBy :: sig (ViaTag tag f) a -> ViaTag tag f a Source #

(MonadReader r f, MonadWriter w f, MonadState s f) => MonadRWS r w s (ViaTag tag f) Source # 
Instance details

Defined in Control.Effect.Tag

SendIns (ins # tag) f => SendIns ins (ViaTag tag f) Source # 
Instance details

Defined in Control.Effect.Tag

Methods

sendIns :: ins a -> ViaTag tag f a Source #

(SendSig (sig ## tag) f, HFunctor sig) => SendSig sig (ViaTag tag f) Source # 
Instance details

Defined in Control.Effect.Tag

Methods

sendSig :: sig (ViaTag tag f) a -> ViaTag tag f a Source #

MonadError e f => MonadError e (ViaTag tag f) Source # 
Instance details

Defined in Control.Effect.Tag

Methods

throwError :: e -> ViaTag tag f a #

catchError :: ViaTag tag f a -> (e -> ViaTag tag f a) -> ViaTag tag f a #

MonadReader r f => MonadReader r (ViaTag tag f) Source # 
Instance details

Defined in Control.Effect.Tag

Methods

ask :: ViaTag tag f r #

local :: (r -> r) -> ViaTag tag f a -> ViaTag tag f a #

reader :: (r -> a) -> ViaTag tag f a #

MonadState s f => MonadState s (ViaTag tag f) Source # 
Instance details

Defined in Control.Effect.Tag

Methods

get :: ViaTag tag f s #

put :: s -> ViaTag tag f () #

state :: (s -> (a, s)) -> ViaTag tag f a #

MonadWriter w f => MonadWriter w (ViaTag tag f) Source # 
Instance details

Defined in Control.Effect.Tag

Methods

writer :: (a, w) -> ViaTag tag f a #

tell :: w -> ViaTag tag f () #

listen :: ViaTag tag f a -> ViaTag tag f (a, w) #

pass :: ViaTag tag f (a, w -> w) -> ViaTag tag f a #

MonadFail f => MonadFail (ViaTag tag f) Source # 
Instance details

Defined in Control.Effect.Tag

Methods

fail :: String -> ViaTag tag f a #

MonadFix f => MonadFix (ViaTag tag f) Source # 
Instance details

Defined in Control.Effect.Tag

Methods

mfix :: (a -> ViaTag tag f a) -> ViaTag tag f a #

MonadIO f => MonadIO (ViaTag tag f) Source # 
Instance details

Defined in Control.Effect.Tag

Methods

liftIO :: IO a -> ViaTag tag f a #

Alternative f => Alternative (ViaTag tag f) Source # 
Instance details

Defined in Control.Effect.Tag

Methods

empty :: ViaTag tag f a #

(<|>) :: ViaTag tag f a -> ViaTag tag f a -> ViaTag tag f a #

some :: ViaTag tag f a -> ViaTag tag f [a] #

many :: ViaTag tag f a -> ViaTag tag f [a] #

Applicative f => Applicative (ViaTag tag f) Source # 
Instance details

Defined in Control.Effect.Tag

Methods

pure :: a -> ViaTag tag f a #

(<*>) :: ViaTag tag f (a -> b) -> ViaTag tag f a -> ViaTag tag f b #

liftA2 :: (a -> b -> c) -> ViaTag tag f a -> ViaTag tag f b -> ViaTag tag f c #

(*>) :: ViaTag tag f a -> ViaTag tag f b -> ViaTag tag f b #

(<*) :: ViaTag tag f a -> ViaTag tag f b -> ViaTag tag f a #

Functor f => Functor (ViaTag tag f) Source # 
Instance details

Defined in Control.Effect.Tag

Methods

fmap :: (a -> b) -> ViaTag tag f a -> ViaTag tag f b #

(<$) :: a -> ViaTag tag f b -> ViaTag tag f a #

Monad f => Monad (ViaTag tag f) Source # 
Instance details

Defined in Control.Effect.Tag

Methods

(>>=) :: ViaTag tag f a -> (a -> ViaTag tag f b) -> ViaTag tag f b #

(>>) :: ViaTag tag f a -> ViaTag tag f b -> ViaTag tag f b #

return :: a -> ViaTag tag f a #

MonadPlus f => MonadPlus (ViaTag tag f) Source # 
Instance details

Defined in Control.Effect.Tag

Methods

mzero :: ViaTag tag f a #

mplus :: ViaTag tag f a -> ViaTag tag f a -> ViaTag tag f a #

tag :: forall tag f a. ViaTag tag f a -> f a Source #

Send all effects within the scope, tagged, to carrier f.