effet-0.2.0.0: An Effect System based on Type Classes
Copyright(c) Michael Szvetits 2020
LicenseBSD3 (see the file LICENSE)
Maintainertypedbyte@qualified.name
Stabilitystable
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Control.Effect.Machinery.Tagger

Description

This module defines an effect handler which handles tagging, retagging and untagging of effects.

Synopsis

Documentation

newtype Tagger tag new m a Source #

This type provides instances for effect type classes in order to enable tagging, retagging and untagging of effects. Whenever this type is used as handler of an effect, the effect previously tagged with tag will be tagged with new instead.

You usually don't interact with this type directly, since the type class instances for this type are generated by the functions found in the module Control.Effect.Machinery.TH.

Constructors

Tagger 

Fields

Instances

Instances details
Map' new k3 v m => Map' (tag :: k2) k3 v (Tagger tag new m) Source # 
Instance details

Defined in Control.Effect.Map

Methods

clear' :: Tagger tag new m () Source #

lookup' :: k3 -> Tagger tag new m (Maybe v) Source #

update' :: k3 -> Maybe v -> Tagger tag new m () Source #

Error' new e m => Error' (tag :: k2) e (Tagger tag new m) Source # 
Instance details

Defined in Control.Effect.Error

Methods

throwError' :: e -> Tagger tag new m a Source #

catchError' :: Tagger tag new m a -> (e -> Tagger tag new m a) -> Tagger tag new m a Source #

Reader' new r m => Reader' (tag :: k2) r (Tagger tag new m) Source # 
Instance details

Defined in Control.Effect.Reader

Methods

ask' :: Tagger tag new m r Source #

local' :: (r -> r) -> Tagger tag new m a -> Tagger tag new m a Source #

reader' :: (r -> a) -> Tagger tag new m a Source #

State' new s m => State' (tag :: k2) s (Tagger tag new m) Source # 
Instance details

Defined in Control.Effect.State

Methods

get' :: Tagger tag new m s Source #

put' :: s -> Tagger tag new m () Source #

state' :: (s -> (s, a)) -> Tagger tag new m a Source #

Writer' new w m => Writer' (tag :: k2) w (Tagger tag new m) Source # 
Instance details

Defined in Control.Effect.Writer

Methods

tell' :: w -> Tagger tag new m () Source #

listen' :: Tagger tag new m a -> Tagger tag new m (w, a) Source #

censor' :: (w -> w) -> Tagger tag new m a -> Tagger tag new m a Source #

Cont' new m => Cont' (tag :: k2) (Tagger tag new m) Source # 
Instance details

Defined in Control.Effect.Cont

Methods

callCC' :: ((a -> Tagger tag new m b) -> Tagger tag new m a) -> Tagger tag new m a Source #

Resource' new m => Resource' (tag :: k2) (Tagger tag new m) Source # 
Instance details

Defined in Control.Effect.Resource

Methods

bracket' :: Tagger tag new m a -> (a -> Tagger tag new m c) -> (a -> Tagger tag new m b) -> Tagger tag new m b Source #

bracketOnError' :: Tagger tag new m a -> (a -> Tagger tag new m c) -> (a -> Tagger tag new m b) -> Tagger tag new m b Source #

MonadBase b m => MonadBase b (Tagger tag new m) Source # 
Instance details

Defined in Control.Effect.Machinery.Tagger

Methods

liftBase :: b α -> Tagger tag new m α #

MonadBaseControl b m => MonadBaseControl b (Tagger tag new m) Source # 
Instance details

Defined in Control.Effect.Machinery.Tagger

Associated Types

type StM (Tagger tag new m) a #

Methods

liftBaseWith :: (RunInBase (Tagger tag new m) b -> b a) -> Tagger tag new m a #

restoreM :: StM (Tagger tag new m) a -> Tagger tag new m a #

MonadTrans (Tagger tag new :: (Type -> Type) -> Type -> Type) Source # 
Instance details

Defined in Control.Effect.Machinery.Tagger

Methods

lift :: Monad m => m a -> Tagger tag new m a #

MonadTransControl (Tagger tag new :: (Type -> Type) -> Type -> Type) Source # 
Instance details

Defined in Control.Effect.Machinery.Tagger

Associated Types

type StT (Tagger tag new) a #

Methods

liftWith :: Monad m => (Run (Tagger tag new) -> m a) -> Tagger tag new m a #

restoreT :: Monad m => m (StT (Tagger tag new) a) -> Tagger tag new m a #

Monad m => Monad (Tagger tag new m) Source # 
Instance details

Defined in Control.Effect.Machinery.Tagger

Methods

(>>=) :: Tagger tag new m a -> (a -> Tagger tag new m b) -> Tagger tag new m b #

(>>) :: Tagger tag new m a -> Tagger tag new m b -> Tagger tag new m b #

return :: a -> Tagger tag new m a #

Functor m => Functor (Tagger tag new m) Source # 
Instance details

Defined in Control.Effect.Machinery.Tagger

Methods

fmap :: (a -> b) -> Tagger tag new m a -> Tagger tag new m b #

(<$) :: a -> Tagger tag new m b -> Tagger tag new m a #

Applicative m => Applicative (Tagger tag new m) Source # 
Instance details

Defined in Control.Effect.Machinery.Tagger

Methods

pure :: a -> Tagger tag new m a #

(<*>) :: Tagger tag new m (a -> b) -> Tagger tag new m a -> Tagger tag new m b #

liftA2 :: (a -> b -> c) -> Tagger tag new m a -> Tagger tag new m b -> Tagger tag new m c #

(*>) :: Tagger tag new m a -> Tagger tag new m b -> Tagger tag new m b #

(<*) :: Tagger tag new m a -> Tagger tag new m b -> Tagger tag new m a #

MonadIO m => MonadIO (Tagger tag new m) Source # 
Instance details

Defined in Control.Effect.Machinery.Tagger

Methods

liftIO :: IO a -> Tagger tag new m a #

type StT (Tagger tag new :: (Type -> Type) -> Type -> Type) a Source # 
Instance details

Defined in Control.Effect.Machinery.Tagger

type StT (Tagger tag new :: (Type -> Type) -> Type -> Type) a = StT (Default :: (Type -> Type) -> Type -> Type) a
type StM (Tagger tag new m) a Source # 
Instance details

Defined in Control.Effect.Machinery.Tagger

type StM (Tagger tag new m) a = StM m a