in-other-words-0.2.0.0: A higher-order effect system where the sky's the limit
Safe HaskellNone
LanguageHaskell2010

Control.Effect.Internal.ViaAlg

Documentation

newtype ViaAlg (s :: *) (e :: Effect) m a Source #

Constructors

ViaAlg 

Fields

Instances

Instances details
(Reifies s (ReifiedEffAlgebra (ListenPrim o) m), Monoid o, Monad m) => MonadWriter o (ViaAlg s (ListenPrim o) m) Source # 
Instance details

Defined in Control.Effect.Type.ListenPrim

Methods

writer :: (a, o) -> ViaAlg s (ListenPrim o) m a #

tell :: o -> ViaAlg s (ListenPrim o) m () #

listen :: ViaAlg s (ListenPrim o) m a -> ViaAlg s (ListenPrim o) m (a, o) #

pass :: ViaAlg s (ListenPrim o) m (a, o -> o) -> ViaAlg s (ListenPrim o) m a #

(Reifies s (ReifiedEffAlgebra (WriterPrim o) m), Monoid o, Monad m) => MonadWriter o (ViaAlg s (WriterPrim o) m) Source # 
Instance details

Defined in Control.Effect.Type.WriterPrim

Methods

writer :: (a, o) -> ViaAlg s (WriterPrim o) m a #

tell :: o -> ViaAlg s (WriterPrim o) m () #

listen :: ViaAlg s (WriterPrim o) m a -> ViaAlg s (WriterPrim o) m (a, o) #

pass :: ViaAlg s (WriterPrim o) m (a, o -> o) -> ViaAlg s (WriterPrim o) m a #

(Reifies s (ReifiedEffAlgebra (ReaderPrim i) m), Monad m) => MonadReader i (ViaAlg s (ReaderPrim i) m) Source # 
Instance details

Defined in Control.Effect.Type.ReaderPrim

Methods

ask :: ViaAlg s (ReaderPrim i) m i #

local :: (i -> i) -> ViaAlg s (ReaderPrim i) m a -> ViaAlg s (ReaderPrim i) m a #

reader :: (i -> a) -> ViaAlg s (ReaderPrim i) m a #

Monad m => Monad (ViaAlg s e m) Source # 
Instance details

Defined in Control.Effect.Internal.ViaAlg

Methods

(>>=) :: ViaAlg s e m a -> (a -> ViaAlg s e m b) -> ViaAlg s e m b #

(>>) :: ViaAlg s e m a -> ViaAlg s e m b -> ViaAlg s e m b #

return :: a -> ViaAlg s e m a #

Functor m => Functor (ViaAlg s e m) Source # 
Instance details

Defined in Control.Effect.Internal.ViaAlg

Methods

fmap :: (a -> b) -> ViaAlg s e m a -> ViaAlg s e m b #

(<$) :: a -> ViaAlg s e m b -> ViaAlg s e m a #

(Reifies s (ReifiedEffAlgebra Fix m), Monad m) => MonadFix (ViaAlg s Fix m) Source # 
Instance details

Defined in Control.Effect.Type.Fix

Methods

mfix :: (a -> ViaAlg s Fix m a) -> ViaAlg s Fix m a #

Applicative m => Applicative (ViaAlg s e m) Source # 
Instance details

Defined in Control.Effect.Internal.ViaAlg

Methods

pure :: a -> ViaAlg s e m a #

(<*>) :: ViaAlg s e m (a -> b) -> ViaAlg s e m a -> ViaAlg s e m b #

liftA2 :: (a -> b -> c) -> ViaAlg s e m a -> ViaAlg s e m b -> ViaAlg s e m c #

(*>) :: ViaAlg s e m a -> ViaAlg s e m b -> ViaAlg s e m b #

(<*) :: ViaAlg s e m a -> ViaAlg s e m b -> ViaAlg s e m a #

Monad m => MonadThrow (ViaAlg s Bracket m) Source # 
Instance details

Defined in Control.Effect.Type.Bracket

Methods

throwM :: Exception e => e -> ViaAlg s Bracket m a #

Monad m => MonadThrow (ViaAlg s Mask m) Source # 
Instance details

Defined in Control.Effect.Type.Mask

Methods

throwM :: Exception e => e -> ViaAlg s Mask m a #

Monad m => MonadCatch (ViaAlg s Bracket m) Source # 
Instance details

Defined in Control.Effect.Type.Bracket

Methods

catch :: Exception e => ViaAlg s Bracket m a -> (e -> ViaAlg s Bracket m a) -> ViaAlg s Bracket m a #

Monad m => MonadCatch (ViaAlg s Mask m) Source # 
Instance details

Defined in Control.Effect.Type.Mask

Methods

catch :: Exception e => ViaAlg s Mask m a -> (e -> ViaAlg s Mask m a) -> ViaAlg s Mask m a #

(Reifies s (ReifiedEffAlgebra Bracket m), Monad m) => MonadMask (ViaAlg s Bracket m) Source # 
Instance details

Defined in Control.Effect.Type.Bracket

Methods

mask :: ((forall a. ViaAlg s Bracket m a -> ViaAlg s Bracket m a) -> ViaAlg s Bracket m b) -> ViaAlg s Bracket m b #

uninterruptibleMask :: ((forall a. ViaAlg s Bracket m a -> ViaAlg s Bracket m a) -> ViaAlg s Bracket m b) -> ViaAlg s Bracket m b #

generalBracket :: ViaAlg s Bracket m a -> (a -> ExitCase b -> ViaAlg s Bracket m c) -> (a -> ViaAlg s Bracket m b) -> ViaAlg s Bracket m (b, c) #

(Reifies s (ReifiedEffAlgebra Mask m), Monad m) => MonadMask (ViaAlg s Mask m) Source # 
Instance details

Defined in Control.Effect.Type.Mask

Methods

mask :: ((forall a. ViaAlg s Mask m a -> ViaAlg s Mask m a) -> ViaAlg s Mask m b) -> ViaAlg s Mask m b #

uninterruptibleMask :: ((forall a. ViaAlg s Mask m a -> ViaAlg s Mask m a) -> ViaAlg s Mask m b) -> ViaAlg s Mask m b #

generalBracket :: ViaAlg s Mask m a -> (a -> ExitCase b -> ViaAlg s Mask m c) -> (a -> ViaAlg s Mask m b) -> ViaAlg s Mask m (b, c) #

newtype ReifiedEffAlgebra e m Source #

Constructors

ReifiedEffAlgebra (forall x. e m x -> m x) 

viaAlgT :: forall s e t m a. RepresentationalT t => t m a -> t (ViaAlg s e m) a Source #

unViaAlgT :: forall s e t m a. RepresentationalT t => t (ViaAlg s e m) a -> t m a Source #

mapViaAlgT :: forall s e t m n a b. RepresentationalT t => (t m a -> t n b) -> t (ViaAlg s e m) a -> t (ViaAlg s e n) b Source #

mapUnViaAlgT :: forall s e t m n a b. RepresentationalT t => (t (ViaAlg s e m) a -> t (ViaAlg s e n) b) -> t m a -> t n b Source #