fused-effects-0.2.0.2: A fast, flexible, fused effect system.

Safe HaskellNone
LanguageHaskell2010

Control.Effect

Synopsis

Documentation

class HFunctor sig => Carrier sig h | h -> sig Source #

The class of carriers (results) for algebras (effect handlers) over signatures (effects), whose actions are given by the ret and eff methods.

Minimal complete definition

ret, eff

Instances
Carrier Void VoidC Source # 
Instance details

Defined in Control.Effect.Void

Methods

ret :: a -> VoidC a Source #

eff :: Void VoidC (VoidC a) -> VoidC a Source #

Carrier sig carrier => Carrier sig (Eff carrier) Source # 
Instance details

Defined in Control.Effect.Internal

Methods

ret :: a -> Eff carrier a Source #

eff :: sig (Eff carrier) (Eff carrier a) -> Eff carrier a Source #

Monad m => Carrier (Lift m) (LiftC m) Source # 
Instance details

Defined in Control.Effect.Lift

Methods

ret :: a -> LiftC m a Source #

eff :: Lift m (LiftC m) (LiftC m a) -> LiftC m a Source #

(Carrier sig m, Effect sig) => Carrier (Fail :+: sig) (FailC m) Source # 
Instance details

Defined in Control.Effect.Fail

Methods

ret :: a -> FailC m a Source #

eff :: (Fail :+: sig) (FailC m) (FailC m a) -> FailC m a Source #

(Carrier sig m, MonadIO m) => Carrier (Resource :+: sig) (ResourceC m) Source # 
Instance details

Defined in Control.Effect.Resource

Methods

ret :: a -> ResourceC m a Source #

eff :: (Resource :+: sig) (ResourceC m) (ResourceC m a) -> ResourceC m a Source #

(Carrier sig m, Effect sig, Monad m) => Carrier (Fresh :+: sig) (FreshC m) Source # 
Instance details

Defined in Control.Effect.Fresh

Methods

ret :: a -> FreshC m a Source #

eff :: (Fresh :+: sig) (FreshC m) (FreshC m a) -> FreshC m a Source #

(Alternative m, Carrier sig m, Effect sig, Monad m) => Carrier (Cull :+: (NonDet :+: sig)) (CullC m) Source # 
Instance details

Defined in Control.Effect.Cull

Methods

ret :: a -> CullC m a Source #

eff :: (Cull :+: (NonDet :+: sig)) (CullC m) (CullC m a) -> CullC m a Source #

(Alternative m, Carrier sig m, Effect sig, Monad m) => Carrier (Cut :+: (NonDet :+: sig)) (CutC m) Source # 
Instance details

Defined in Control.Effect.Cut

Methods

ret :: a -> CutC m a Source #

eff :: (Cut :+: (NonDet :+: sig)) (CutC m) (CutC m a) -> CutC m a Source #

(Carrier sig m, Effect sig) => Carrier (Trace :+: sig) (TraceByReturningC m) Source # 
Instance details

Defined in Control.Effect.Trace

Carrier sig m => Carrier (Trace :+: sig) (TraceByIgnoringC m) Source # 
Instance details

Defined in Control.Effect.Trace

(MonadIO m, Carrier sig m) => Carrier (Trace :+: sig) (TraceByPrintingC m) Source # 
Instance details

Defined in Control.Effect.Trace

(Alternative f, Carrier sig m, Effect sig, Traversable f, Monad f, Monad m) => Carrier (NonDet :+: sig) (OnceC f m) Source # 
Instance details

Defined in Control.Effect.NonDet

Methods

ret :: a -> OnceC f m a Source #

eff :: (NonDet :+: sig) (OnceC f m) (OnceC f m a) -> OnceC f m a Source #

(Alternative f, Monad f, Traversable f, Carrier sig m, Effect sig, Applicative m) => Carrier (NonDet :+: sig) (AltC f m) Source # 
Instance details

Defined in Control.Effect.NonDet

Methods

ret :: a -> AltC f m a Source #

eff :: (NonDet :+: sig) (AltC f m) (AltC f m a) -> AltC f m a Source #

(Carrier sig m, Effect sig, RandomGen g, Monad m) => Carrier (Random :+: sig) (RandomC g m) Source # 
Instance details

Defined in Control.Effect.Random

Methods

ret :: a -> RandomC g m a Source #

eff :: (Random :+: sig) (RandomC g m) (RandomC g m a) -> RandomC g m a Source #

(Carrier sig m, Effect sig) => Carrier (State s :+: sig) (StateC s m) Source # 
Instance details

Defined in Control.Effect.State

Methods

ret :: a -> StateC s m a Source #

eff :: (State s :+: sig) (StateC s m) (StateC s m a) -> StateC s m a Source #

(Carrier sig m, Monad m) => Carrier (Resumable err :+: sig) (ResumableWithC err m) Source # 
Instance details

Defined in Control.Effect.Resumable

Methods

ret :: a -> ResumableWithC err m a Source #

eff :: (Resumable err :+: sig) (ResumableWithC err m) (ResumableWithC err m a) -> ResumableWithC err m a Source #

(Carrier sig m, Effect sig) => Carrier (Resumable err :+: sig) (ResumableC err m) Source # 
Instance details

Defined in Control.Effect.Resumable

Methods

ret :: a -> ResumableC err m a Source #

eff :: (Resumable err :+: sig) (ResumableC err m) (ResumableC err m a) -> ResumableC err m a Source #

(Carrier sig m, Monad m) => Carrier (Reader r :+: sig) (ReaderC r m) Source # 
Instance details

Defined in Control.Effect.Reader

Methods

ret :: a -> ReaderC r m a Source #

eff :: (Reader r :+: sig) (ReaderC r m) (ReaderC r m a) -> ReaderC r m a Source #

(Carrier sig m, Effect sig, Monad m) => Carrier (Error e :+: sig) (ErrorC e m) Source # 
Instance details

Defined in Control.Effect.Error

Methods

ret :: a -> ErrorC e m a Source #

eff :: (Error e :+: sig) (ErrorC e m) (ErrorC e m a) -> ErrorC e m a Source #

(Monoid w, Carrier sig m, Effect sig, Monad m) => Carrier (Writer w :+: sig) (WriterC w m) Source # 
Instance details

Defined in Control.Effect.Writer

Methods

ret :: a -> WriterC w m a Source #

eff :: (Writer w :+: sig) (WriterC w m) (WriterC w m a) -> WriterC w m a Source #

class HFunctor sig => Effect sig Source #

The class of effect types, which must:

  1. Be functorial in their last two arguments, and
  2. Support threading effects in higher-order positions through using the carrier’s suspended state.

Minimal complete definition

handle

Instances
Effect Fail Source # 
Instance details

Defined in Control.Effect.Fail.Internal

Methods

handle :: Functor f => f () -> (forall x. f (m x) -> n (f x)) -> Fail m (m a) -> Fail n (n (f a)) Source #

Effect NonDet Source # 
Instance details

Defined in Control.Effect.NonDet.Internal

Methods

handle :: Functor f => f () -> (forall x. f (m x) -> n (f x)) -> NonDet m (m a) -> NonDet n (n (f a)) Source #

Effect Random Source # 
Instance details

Defined in Control.Effect.Random.Internal

Methods

handle :: Functor f => f () -> (forall x. f (m x) -> n (f x)) -> Random m (m a) -> Random n (n (f a)) Source #

Effect Resource Source # 
Instance details

Defined in Control.Effect.Resource

Methods

handle :: Functor f => f () -> (forall x. f (m x) -> n (f x)) -> Resource m (m a) -> Resource n (n (f a)) Source #

Effect Fresh Source # 
Instance details

Defined in Control.Effect.Fresh

Methods

handle :: Functor f => f () -> (forall x. f (m x) -> n (f x)) -> Fresh m (m a) -> Fresh n (n (f a)) Source #

Effect Cull Source # 
Instance details

Defined in Control.Effect.Cull

Methods

handle :: Functor f => f () -> (forall x. f (m x) -> n (f x)) -> Cull m (m a) -> Cull n (n (f a)) Source #

Effect Cut Source # 
Instance details

Defined in Control.Effect.Cut

Methods

handle :: Functor f => f () -> (forall x. f (m x) -> n (f x)) -> Cut m (m a) -> Cut n (n (f a)) Source #

Effect Trace Source # 
Instance details

Defined in Control.Effect.Trace

Methods

handle :: Functor f => f () -> (forall x. f (m x) -> n (f x)) -> Trace m (m a) -> Trace n (n (f a)) Source #

Effect Void Source # 
Instance details

Defined in Control.Effect.Void

Methods

handle :: Functor f => f () -> (forall x. f (m x) -> n (f x)) -> Void m (m a) -> Void n (n (f a)) Source #

Functor sig => Effect (Lift sig) Source # 
Instance details

Defined in Control.Effect.Lift.Internal

Methods

handle :: Functor f => f () -> (forall x. f (m x) -> n (f x)) -> Lift sig m (m a) -> Lift sig n (n (f a)) Source #

Effect (State s) Source # 
Instance details

Defined in Control.Effect.State

Methods

handle :: Functor f => f () -> (forall x. f (m x) -> n (f x)) -> State s m (m a) -> State s n (n (f a)) Source #

Effect (Resumable err) Source # 
Instance details

Defined in Control.Effect.Resumable

Methods

handle :: Functor f => f () -> (forall x. f (m x) -> n (f x)) -> Resumable err m (m a) -> Resumable err n (n (f a)) Source #

Effect (Reader r) Source # 
Instance details

Defined in Control.Effect.Reader

Methods

handle :: Functor f => f () -> (forall x. f (m x) -> n (f x)) -> Reader r m (m a) -> Reader r n (n (f a)) Source #

Effect (Error exc) Source # 
Instance details

Defined in Control.Effect.Error

Methods

handle :: Functor f => f () -> (forall x. f (m x) -> n (f x)) -> Error exc m (m a) -> Error exc n (n (f a)) Source #

Effect (Writer w) Source # 
Instance details

Defined in Control.Effect.Writer

Methods

handle :: Functor f => f () -> (forall x. f (m x) -> n (f x)) -> Writer w m (m a) -> Writer w n (n (f a)) Source #

(Effect l, Effect r) => Effect (l :+: r) Source # 
Instance details

Defined in Control.Effect.Sum

Methods

handle :: Functor f => f () -> (forall x. f (m x) -> n (f x)) -> (l :+: r) m (m a) -> (l :+: r) n (n (f a)) Source #

data Fail (m :: * -> *) k Source #

Instances
Effect Fail Source # 
Instance details

Defined in Control.Effect.Fail.Internal

Methods

handle :: Functor f => f () -> (forall x. f (m x) -> n (f x)) -> Fail m (m a) -> Fail n (n (f a)) Source #

HFunctor Fail Source # 
Instance details

Defined in Control.Effect.Fail.Internal

Methods

fmap' :: (a -> b) -> Fail m a -> Fail m b Source #

hmap :: (forall x. m x -> n x) -> Fail m a -> Fail n a Source #

Functor (Fail m) Source # 
Instance details

Defined in Control.Effect.Fail.Internal

Methods

fmap :: (a -> b) -> Fail m a -> Fail m b #

(<$) :: a -> Fail m b -> Fail m a #

(Carrier sig m, Effect sig) => Carrier (Fail :+: sig) (FailC m) Source # 
Instance details

Defined in Control.Effect.Fail

Methods

ret :: a -> FailC m a Source #

eff :: (Fail :+: sig) (FailC m) (FailC m a) -> FailC m a Source #

data Lift sig (m :: * -> *) k Source #

Instances
Functor sig => Effect (Lift sig) Source # 
Instance details

Defined in Control.Effect.Lift.Internal

Methods

handle :: Functor f => f () -> (forall x. f (m x) -> n (f x)) -> Lift sig m (m a) -> Lift sig n (n (f a)) Source #

Functor sig => HFunctor (Lift sig) Source # 
Instance details

Defined in Control.Effect.Lift.Internal

Methods

fmap' :: (a -> b) -> Lift sig m a -> Lift sig m b Source #

hmap :: (forall x. m x -> n x) -> Lift sig m a -> Lift sig n a Source #

Monad m => Carrier (Lift m) (LiftC m) Source # 
Instance details

Defined in Control.Effect.Lift

Methods

ret :: a -> LiftC m a Source #

eff :: Lift m (LiftC m) (LiftC m a) -> LiftC m a Source #

Functor sig => Functor (Lift sig m) Source # 
Instance details

Defined in Control.Effect.Lift.Internal

Methods

fmap :: (a -> b) -> Lift sig m a -> Lift sig m b #

(<$) :: a -> Lift sig m b -> Lift sig m a #

data NonDet (m :: * -> *) k Source #

Instances
Effect NonDet Source # 
Instance details

Defined in Control.Effect.NonDet.Internal

Methods

handle :: Functor f => f () -> (forall x. f (m x) -> n (f x)) -> NonDet m (m a) -> NonDet n (n (f a)) Source #

HFunctor NonDet Source # 
Instance details

Defined in Control.Effect.NonDet.Internal

Methods

fmap' :: (a -> b) -> NonDet m a -> NonDet m b Source #

hmap :: (forall x. m x -> n x) -> NonDet m a -> NonDet n a Source #

Functor (NonDet m) Source # 
Instance details

Defined in Control.Effect.NonDet.Internal

Methods

fmap :: (a -> b) -> NonDet m a -> NonDet m b #

(<$) :: a -> NonDet m b -> NonDet m a #

(Alternative m, Carrier sig m, Effect sig, Monad m) => Carrier (Cull :+: (NonDet :+: sig)) (CullC m) Source # 
Instance details

Defined in Control.Effect.Cull

Methods

ret :: a -> CullC m a Source #

eff :: (Cull :+: (NonDet :+: sig)) (CullC m) (CullC m a) -> CullC m a Source #

(Alternative m, Carrier sig m, Effect sig, Monad m) => Carrier (Cut :+: (NonDet :+: sig)) (CutC m) Source # 
Instance details

Defined in Control.Effect.Cut

Methods

ret :: a -> CutC m a Source #

eff :: (Cut :+: (NonDet :+: sig)) (CutC m) (CutC m a) -> CutC m a Source #

(Alternative f, Carrier sig m, Effect sig, Traversable f, Monad f, Monad m) => Carrier (NonDet :+: sig) (OnceC f m) Source # 
Instance details

Defined in Control.Effect.NonDet

Methods

ret :: a -> OnceC f m a Source #

eff :: (NonDet :+: sig) (OnceC f m) (OnceC f m a) -> OnceC f m a Source #

(Alternative f, Monad f, Traversable f, Carrier sig m, Effect sig, Applicative m) => Carrier (NonDet :+: sig) (AltC f m) Source # 
Instance details

Defined in Control.Effect.NonDet

Methods

ret :: a -> AltC f m a Source #

eff :: (NonDet :+: sig) (AltC f m) (AltC f m a) -> AltC f m a Source #

data Random m k Source #

Instances
Effect Random Source # 
Instance details

Defined in Control.Effect.Random.Internal

Methods

handle :: Functor f => f () -> (forall x. f (m x) -> n (f x)) -> Random m (m a) -> Random n (n (f a)) Source #

HFunctor Random Source # 
Instance details

Defined in Control.Effect.Random.Internal

Methods

fmap' :: (a -> b) -> Random m a -> Random m b Source #

hmap :: (forall x. m x -> n x) -> Random m a -> Random n a Source #

Functor (Random m) Source # 
Instance details

Defined in Control.Effect.Random.Internal

Methods

fmap :: (a -> b) -> Random m a -> Random m b #

(<$) :: a -> Random m b -> Random m a #

(Carrier sig m, Effect sig, RandomGen g, Monad m) => Carrier (Random :+: sig) (RandomC g m) Source # 
Instance details

Defined in Control.Effect.Random

Methods

ret :: a -> RandomC g m a Source #

eff :: (Random :+: sig) (RandomC g m) (RandomC g m a) -> RandomC g m a Source #

class Member (sub :: (* -> *) -> * -> *) sup Source #

Minimal complete definition

inj, prj

Instances
Member sub sub Source # 
Instance details

Defined in Control.Effect.Sum

Methods

inj :: sub m a -> sub m a Source #

prj :: sub m a -> Maybe (sub m a) Source #

Member sub sup => Member sub (sub' :+: sup) Source # 
Instance details

Defined in Control.Effect.Sum

Methods

inj :: sub m a -> (sub' :+: sup) m a Source #

prj :: (sub' :+: sup) m a -> Maybe (sub m a) Source #

Member sub (sub :+: sup) Source # 
Instance details

Defined in Control.Effect.Sum

Methods

inj :: sub m a -> (sub :+: sup) m a Source #

prj :: (sub :+: sup) m a -> Maybe (sub m a) Source #

data (f :+: g) (m :: * -> *) k infixr 4 Source #

Instances
Member sub sup => Member sub (sub' :+: sup) Source # 
Instance details

Defined in Control.Effect.Sum

Methods

inj :: sub m a -> (sub' :+: sup) m a Source #

prj :: (sub' :+: sup) m a -> Maybe (sub m a) Source #

Member sub (sub :+: sup) Source # 
Instance details

Defined in Control.Effect.Sum

Methods

inj :: sub m a -> (sub :+: sup) m a Source #

prj :: (sub :+: sup) m a -> Maybe (sub m a) Source #

(Effect l, Effect r) => Effect (l :+: r) Source # 
Instance details

Defined in Control.Effect.Sum

Methods

handle :: Functor f => f () -> (forall x. f (m x) -> n (f x)) -> (l :+: r) m (m a) -> (l :+: r) n (n (f a)) Source #

(HFunctor l, HFunctor r) => HFunctor (l :+: r) Source # 
Instance details

Defined in Control.Effect.Sum

Methods

fmap' :: (a -> b) -> (l :+: r) m a -> (l :+: r) m b Source #

hmap :: (forall x. m x -> n x) -> (l :+: r) m a -> (l :+: r) n a Source #

(Carrier sig m, Effect sig) => Carrier (Fail :+: sig) (FailC m) Source # 
Instance details

Defined in Control.Effect.Fail

Methods

ret :: a -> FailC m a Source #

eff :: (Fail :+: sig) (FailC m) (FailC m a) -> FailC m a Source #

(Carrier sig m, MonadIO m) => Carrier (Resource :+: sig) (ResourceC m) Source # 
Instance details

Defined in Control.Effect.Resource

Methods

ret :: a -> ResourceC m a Source #

eff :: (Resource :+: sig) (ResourceC m) (ResourceC m a) -> ResourceC m a Source #

(Carrier sig m, Effect sig, Monad m) => Carrier (Fresh :+: sig) (FreshC m) Source # 
Instance details

Defined in Control.Effect.Fresh

Methods

ret :: a -> FreshC m a Source #

eff :: (Fresh :+: sig) (FreshC m) (FreshC m a) -> FreshC m a Source #

(Alternative m, Carrier sig m, Effect sig, Monad m) => Carrier (Cull :+: (NonDet :+: sig)) (CullC m) Source # 
Instance details

Defined in Control.Effect.Cull

Methods

ret :: a -> CullC m a Source #

eff :: (Cull :+: (NonDet :+: sig)) (CullC m) (CullC m a) -> CullC m a Source #

(Alternative m, Carrier sig m, Effect sig, Monad m) => Carrier (Cut :+: (NonDet :+: sig)) (CutC m) Source # 
Instance details

Defined in Control.Effect.Cut

Methods

ret :: a -> CutC m a Source #

eff :: (Cut :+: (NonDet :+: sig)) (CutC m) (CutC m a) -> CutC m a Source #

(Carrier sig m, Effect sig) => Carrier (Trace :+: sig) (TraceByReturningC m) Source # 
Instance details

Defined in Control.Effect.Trace

Carrier sig m => Carrier (Trace :+: sig) (TraceByIgnoringC m) Source # 
Instance details

Defined in Control.Effect.Trace

(MonadIO m, Carrier sig m) => Carrier (Trace :+: sig) (TraceByPrintingC m) Source # 
Instance details

Defined in Control.Effect.Trace

(Alternative f, Carrier sig m, Effect sig, Traversable f, Monad f, Monad m) => Carrier (NonDet :+: sig) (OnceC f m) Source # 
Instance details

Defined in Control.Effect.NonDet

Methods

ret :: a -> OnceC f m a Source #

eff :: (NonDet :+: sig) (OnceC f m) (OnceC f m a) -> OnceC f m a Source #

(Alternative f, Monad f, Traversable f, Carrier sig m, Effect sig, Applicative m) => Carrier (NonDet :+: sig) (AltC f m) Source # 
Instance details

Defined in Control.Effect.NonDet

Methods

ret :: a -> AltC f m a Source #

eff :: (NonDet :+: sig) (AltC f m) (AltC f m a) -> AltC f m a Source #

(Carrier sig m, Effect sig, RandomGen g, Monad m) => Carrier (Random :+: sig) (RandomC g m) Source # 
Instance details

Defined in Control.Effect.Random

Methods

ret :: a -> RandomC g m a Source #

eff :: (Random :+: sig) (RandomC g m) (RandomC g m a) -> RandomC g m a Source #

(Carrier sig m, Effect sig) => Carrier (State s :+: sig) (StateC s m) Source # 
Instance details

Defined in Control.Effect.State

Methods

ret :: a -> StateC s m a Source #

eff :: (State s :+: sig) (StateC s m) (StateC s m a) -> StateC s m a Source #

(Carrier sig m, Monad m) => Carrier (Resumable err :+: sig) (ResumableWithC err m) Source # 
Instance details

Defined in Control.Effect.Resumable

Methods

ret :: a -> ResumableWithC err m a Source #

eff :: (Resumable err :+: sig) (ResumableWithC err m) (ResumableWithC err m a) -> ResumableWithC err m a Source #

(Carrier sig m, Effect sig) => Carrier (Resumable err :+: sig) (ResumableC err m) Source # 
Instance details

Defined in Control.Effect.Resumable

Methods

ret :: a -> ResumableC err m a Source #

eff :: (Resumable err :+: sig) (ResumableC err m) (ResumableC err m a) -> ResumableC err m a Source #

(Carrier sig m, Monad m) => Carrier (Reader r :+: sig) (ReaderC r m) Source # 
Instance details

Defined in Control.Effect.Reader

Methods

ret :: a -> ReaderC r m a Source #

eff :: (Reader r :+: sig) (ReaderC r m) (ReaderC r m a) -> ReaderC r m a Source #

(Carrier sig m, Effect sig, Monad m) => Carrier (Error e :+: sig) (ErrorC e m) Source # 
Instance details

Defined in Control.Effect.Error

Methods

ret :: a -> ErrorC e m a Source #

eff :: (Error e :+: sig) (ErrorC e m) (ErrorC e m a) -> ErrorC e m a Source #

(Monoid w, Carrier sig m, Effect sig, Monad m) => Carrier (Writer w :+: sig) (WriterC w m) Source # 
Instance details

Defined in Control.Effect.Writer

Methods

ret :: a -> WriterC w m a Source #

eff :: (Writer w :+: sig) (WriterC w m) (WriterC w m a) -> WriterC w m a Source #

(Functor (f m), Functor (g m)) => Functor ((f :+: g) m) Source # 
Instance details

Defined in Control.Effect.Sum

Methods

fmap :: (a -> b) -> (f :+: g) m a -> (f :+: g) m b #

(<$) :: a -> (f :+: g) m b -> (f :+: g) m a #

(Eq (f m k), Eq (g m k)) => Eq ((f :+: g) m k) Source # 
Instance details

Defined in Control.Effect.Sum

Methods

(==) :: (f :+: g) m k -> (f :+: g) m k -> Bool #

(/=) :: (f :+: g) m k -> (f :+: g) m k -> Bool #

(Ord (f m k), Ord (g m k)) => Ord ((f :+: g) m k) Source # 
Instance details

Defined in Control.Effect.Sum

Methods

compare :: (f :+: g) m k -> (f :+: g) m k -> Ordering #

(<) :: (f :+: g) m k -> (f :+: g) m k -> Bool #

(<=) :: (f :+: g) m k -> (f :+: g) m k -> Bool #

(>) :: (f :+: g) m k -> (f :+: g) m k -> Bool #

(>=) :: (f :+: g) m k -> (f :+: g) m k -> Bool #

max :: (f :+: g) m k -> (f :+: g) m k -> (f :+: g) m k #

min :: (f :+: g) m k -> (f :+: g) m k -> (f :+: g) m k #

(Show (f m k), Show (g m k)) => Show ((f :+: g) m k) Source # 
Instance details

Defined in Control.Effect.Sum

Methods

showsPrec :: Int -> (f :+: g) m k -> ShowS #

show :: (f :+: g) m k -> String #

showList :: [(f :+: g) m k] -> ShowS #

send :: (Member effect sig, Carrier sig m) => effect m (m a) -> m a Source #

Construct a request for an effect to be interpreted by some handler later on.

data Eff carrier a Source #

Instances
Carrier sig carrier => Carrier sig (Eff carrier) Source # 
Instance details

Defined in Control.Effect.Internal

Methods

ret :: a -> Eff carrier a Source #

eff :: sig (Eff carrier) (Eff carrier a) -> Eff carrier a Source #

Monad (Eff carrier) Source # 
Instance details

Defined in Control.Effect.Internal

Methods

(>>=) :: Eff carrier a -> (a -> Eff carrier b) -> Eff carrier b #

(>>) :: Eff carrier a -> Eff carrier b -> Eff carrier b #

return :: a -> Eff carrier a #

fail :: String -> Eff carrier a #

Functor (Eff carrier) Source # 
Instance details

Defined in Control.Effect.Internal

Methods

fmap :: (a -> b) -> Eff carrier a -> Eff carrier b #

(<$) :: a -> Eff carrier b -> Eff carrier a #

(Member Fail sig, Carrier sig carrier) => MonadFail (Eff carrier) Source # 
Instance details

Defined in Control.Effect.Internal

Methods

fail :: String -> Eff carrier a #

Applicative (Eff carrier) Source # 
Instance details

Defined in Control.Effect.Internal

Methods

pure :: a -> Eff carrier a #

(<*>) :: Eff carrier (a -> b) -> Eff carrier a -> Eff carrier b #

liftA2 :: (a -> b -> c) -> Eff carrier a -> Eff carrier b -> Eff carrier c #

(*>) :: Eff carrier a -> Eff carrier b -> Eff carrier b #

(<*) :: Eff carrier a -> Eff carrier b -> Eff carrier a #

(Member (Lift IO) sig, Carrier sig carrier) => MonadIO (Eff carrier) Source # 
Instance details

Defined in Control.Effect.Internal

Methods

liftIO :: IO a -> Eff carrier a #

(Member NonDet sig, Carrier sig carrier) => Alternative (Eff carrier) Source #

Run computations nondeterministically.

run (runNonDet empty) == []
run (runNonDet empty) == Nothing
run (runNonDet (pure a <|> pure b)) == [a, b]
run (runNonDet (pure a <|> pure b)) == Just a

Associativity:

run (runNonDet ((pure a <|> pure b) <|> pure c)) == (run (runNonDet (pure a <|> (pure b <|> pure c))) :: [Integer])
run (runNonDet ((pure a <|> pure b) <|> pure c)) == (run (runNonDet (pure a <|> (pure b <|> pure c))) :: Maybe Integer)

Left-identity:

run (runNonDet (empty <|> pure b)) == (run (runNonDet (pure b)) :: [Integer])
run (runNonDet (empty <|> pure b)) == (run (runNonDet (pure b)) :: Maybe Integer)

Right-identity:

run (runNonDet (pure a <|> empty)) == (run (runNonDet (pure a)) :: [Integer])
run (runNonDet (pure a <|> empty)) == (run (runNonDet (pure a)) :: Maybe Integer)
Instance details

Defined in Control.Effect.Internal

Methods

empty :: Eff carrier a #

(<|>) :: Eff carrier a -> Eff carrier a -> Eff carrier a #

some :: Eff carrier a -> Eff carrier [a] #

many :: Eff carrier a -> Eff carrier [a] #

(Member NonDet sig, Carrier sig carrier) => MonadPlus (Eff carrier) Source # 
Instance details

Defined in Control.Effect.Internal

Methods

mzero :: Eff carrier a #

mplus :: Eff carrier a -> Eff carrier a -> Eff carrier a #

(Member Random sig, Carrier sig carrier) => MonadInterleave (Eff carrier) Source # 
Instance details

Defined in Control.Effect.Internal

Methods

interleave :: Eff carrier a -> Eff carrier a #

(Member Random sig, Carrier sig carrier) => MonadRandom (Eff carrier) Source # 
Instance details

Defined in Control.Effect.Internal

Methods

getRandomR :: Random a => (a, a) -> Eff carrier a #

getRandom :: Random a => Eff carrier a #

getRandomRs :: Random a => (a, a) -> Eff carrier [a] #

getRandoms :: Random a => Eff carrier [a] #

interpret :: Carrier sig carrier => Eff carrier a -> carrier a Source #

data StateC s m a Source #

Instances
(Carrier sig m, Effect sig) => Carrier (State s :+: sig) (StateC s m) Source # 
Instance details

Defined in Control.Effect.State

Methods

ret :: a -> StateC s m a Source #

eff :: (State s :+: sig) (StateC s m) (StateC s m a) -> StateC s m a Source #

data State s (m :: * -> *) k Source #

Instances
Effect (State s) Source # 
Instance details

Defined in Control.Effect.State

Methods

handle :: Functor f => f () -> (forall x. f (m x) -> n (f x)) -> State s m (m a) -> State s n (n (f a)) Source #

HFunctor (State s) Source # 
Instance details

Defined in Control.Effect.State

Methods

fmap' :: (a -> b) -> State s m a -> State s m b Source #

hmap :: (forall x. m x -> n x) -> State s m a -> State s n a Source #

Functor (State s m) Source # 
Instance details

Defined in Control.Effect.State

Methods

fmap :: (a -> b) -> State s m a -> State s m b #

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

(Carrier sig m, Effect sig) => Carrier (State s :+: sig) (StateC s m) Source # 
Instance details

Defined in Control.Effect.State

Methods

ret :: a -> StateC s m a Source #

eff :: (State s :+: sig) (StateC s m) (StateC s m a) -> StateC s m a Source #

data ResumableWithC err m a Source #

Instances
(Carrier sig m, Monad m) => Carrier (Resumable err :+: sig) (ResumableWithC err m) Source # 
Instance details

Defined in Control.Effect.Resumable

Methods

ret :: a -> ResumableWithC err m a Source #

eff :: (Resumable err :+: sig) (ResumableWithC err m) (ResumableWithC err m a) -> ResumableWithC err m a Source #

data ResumableC err m a Source #

Instances
(Carrier sig m, Effect sig) => Carrier (Resumable err :+: sig) (ResumableC err m) Source # 
Instance details

Defined in Control.Effect.Resumable

Methods

ret :: a -> ResumableC err m a Source #

eff :: (Resumable err :+: sig) (ResumableC err m) (ResumableC err m a) -> ResumableC err m a Source #

data Resumable err (m :: * -> *) k Source #

Errors which can be resumed with values of some existentially-quantified type.

Instances
Effect (Resumable err) Source # 
Instance details

Defined in Control.Effect.Resumable

Methods

handle :: Functor f => f () -> (forall x. f (m x) -> n (f x)) -> Resumable err m (m a) -> Resumable err n (n (f a)) Source #

HFunctor (Resumable err) Source # 
Instance details

Defined in Control.Effect.Resumable

Methods

fmap' :: (a -> b) -> Resumable err m a -> Resumable err m b Source #

hmap :: (forall x. m x -> n x) -> Resumable err m a -> Resumable err n a Source #

Functor (Resumable err m) Source # 
Instance details

Defined in Control.Effect.Resumable

Methods

fmap :: (a -> b) -> Resumable err m a -> Resumable err m b #

(<$) :: a -> Resumable err m b -> Resumable err m a #

(Carrier sig m, Monad m) => Carrier (Resumable err :+: sig) (ResumableWithC err m) Source # 
Instance details

Defined in Control.Effect.Resumable

Methods

ret :: a -> ResumableWithC err m a Source #

eff :: (Resumable err :+: sig) (ResumableWithC err m) (ResumableWithC err m a) -> ResumableWithC err m a Source #

(Carrier sig m, Effect sig) => Carrier (Resumable err :+: sig) (ResumableC err m) Source # 
Instance details

Defined in Control.Effect.Resumable

Methods

ret :: a -> ResumableC err m a Source #

eff :: (Resumable err :+: sig) (ResumableC err m) (ResumableC err m a) -> ResumableC err m a Source #

data ResourceC m a Source #

Instances
(Carrier sig m, MonadIO m) => Carrier (Resource :+: sig) (ResourceC m) Source # 
Instance details

Defined in Control.Effect.Resource

Methods

ret :: a -> ResourceC m a Source #

eff :: (Resource :+: sig) (ResourceC m) (ResourceC m a) -> ResourceC m a Source #

data Resource m k Source #

Instances
Effect Resource Source # 
Instance details

Defined in Control.Effect.Resource

Methods

handle :: Functor f => f () -> (forall x. f (m x) -> n (f x)) -> Resource m (m a) -> Resource n (n (f a)) Source #

HFunctor Resource Source # 
Instance details

Defined in Control.Effect.Resource

Methods

fmap' :: (a -> b) -> Resource m a -> Resource m b Source #

hmap :: (forall x. m x -> n x) -> Resource m a -> Resource n a Source #

Functor (Resource m) Source # 
Instance details

Defined in Control.Effect.Resource

Methods

fmap :: (a -> b) -> Resource m a -> Resource m b #

(<$) :: a -> Resource m b -> Resource m a #

(Carrier sig m, MonadIO m) => Carrier (Resource :+: sig) (ResourceC m) Source # 
Instance details

Defined in Control.Effect.Resource

Methods

ret :: a -> ResourceC m a Source #

eff :: (Resource :+: sig) (ResourceC m) (ResourceC m a) -> ResourceC m a Source #

data ReaderC r m a Source #

Instances
(Carrier sig m, Monad m) => Carrier (Reader r :+: sig) (ReaderC r m) Source # 
Instance details

Defined in Control.Effect.Reader

Methods

ret :: a -> ReaderC r m a Source #

eff :: (Reader r :+: sig) (ReaderC r m) (ReaderC r m a) -> ReaderC r m a Source #

data Reader r m k Source #

Instances
Effect (Reader r) Source # 
Instance details

Defined in Control.Effect.Reader

Methods

handle :: Functor f => f () -> (forall x. f (m x) -> n (f x)) -> Reader r m (m a) -> Reader r n (n (f a)) Source #

HFunctor (Reader r) Source # 
Instance details

Defined in Control.Effect.Reader

Methods

fmap' :: (a -> b) -> Reader r m a -> Reader r m b Source #

hmap :: (forall x. m x -> n x) -> Reader r m a -> Reader r n a Source #

Functor (Reader r m) Source # 
Instance details

Defined in Control.Effect.Reader

Methods

fmap :: (a -> b) -> Reader r m a -> Reader r m b #

(<$) :: a -> Reader r m b -> Reader r m a #

(Carrier sig m, Monad m) => Carrier (Reader r :+: sig) (ReaderC r m) Source # 
Instance details

Defined in Control.Effect.Reader

Methods

ret :: a -> ReaderC r m a Source #

eff :: (Reader r :+: sig) (ReaderC r m) (ReaderC r m a) -> ReaderC r m a Source #

data RandomC g m a Source #

Instances
(Carrier sig m, Effect sig, RandomGen g, Monad m) => Carrier (Random :+: sig) (RandomC g m) Source # 
Instance details

Defined in Control.Effect.Random

Methods

ret :: a -> RandomC g m a Source #

eff :: (Random :+: sig) (RandomC g m) (RandomC g m a) -> RandomC g m a Source #

data LiftC m a Source #

Instances
Monad m => Carrier (Lift m) (LiftC m) Source # 
Instance details

Defined in Control.Effect.Lift

Methods

ret :: a -> LiftC m a Source #

eff :: Lift m (LiftC m) (LiftC m a) -> LiftC m a Source #

runM :: Monad m => Eff (LiftC m) a -> m a Source #

Extract a Lifted Monadic action from an effectful computation.

data FreshC m a Source #

Instances
(Carrier sig m, Effect sig, Monad m) => Carrier (Fresh :+: sig) (FreshC m) Source # 
Instance details

Defined in Control.Effect.Fresh

Methods

ret :: a -> FreshC m a Source #

eff :: (Fresh :+: sig) (FreshC m) (FreshC m a) -> FreshC m a Source #

data Fresh m k Source #

Instances
Effect Fresh Source # 
Instance details

Defined in Control.Effect.Fresh

Methods

handle :: Functor f => f () -> (forall x. f (m x) -> n (f x)) -> Fresh m (m a) -> Fresh n (n (f a)) Source #

HFunctor Fresh Source # 
Instance details

Defined in Control.Effect.Fresh

Methods

fmap' :: (a -> b) -> Fresh m a -> Fresh m b Source #

hmap :: (forall x. m x -> n x) -> Fresh m a -> Fresh n a Source #

Functor (Fresh m) Source # 
Instance details

Defined in Control.Effect.Fresh

Methods

fmap :: (a -> b) -> Fresh m a -> Fresh m b #

(<$) :: a -> Fresh m b -> Fresh m a #

(Carrier sig m, Effect sig, Monad m) => Carrier (Fresh :+: sig) (FreshC m) Source # 
Instance details

Defined in Control.Effect.Fresh

Methods

ret :: a -> FreshC m a Source #

eff :: (Fresh :+: sig) (FreshC m) (FreshC m a) -> FreshC m a Source #

data FailC m a Source #

Instances
(Carrier sig m, Effect sig) => Carrier (Fail :+: sig) (FailC m) Source # 
Instance details

Defined in Control.Effect.Fail

Methods

ret :: a -> FailC m a Source #

eff :: (Fail :+: sig) (FailC m) (FailC m a) -> FailC m a Source #

data ErrorC e m a Source #

Instances
(Carrier sig m, Effect sig, Monad m) => Carrier (Error e :+: sig) (ErrorC e m) Source # 
Instance details

Defined in Control.Effect.Error

Methods

ret :: a -> ErrorC e m a Source #

eff :: (Error e :+: sig) (ErrorC e m) (ErrorC e m a) -> ErrorC e m a Source #

data Error exc m k Source #

Instances
Effect (Error exc) Source # 
Instance details

Defined in Control.Effect.Error

Methods

handle :: Functor f => f () -> (forall x. f (m x) -> n (f x)) -> Error exc m (m a) -> Error exc n (n (f a)) Source #

HFunctor (Error exc) Source # 
Instance details

Defined in Control.Effect.Error

Methods

fmap' :: (a -> b) -> Error exc m a -> Error exc m b Source #

hmap :: (forall x. m x -> n x) -> Error exc m a -> Error exc n a Source #

Functor (Error exc m) Source # 
Instance details

Defined in Control.Effect.Error

Methods

fmap :: (a -> b) -> Error exc m a -> Error exc m b #

(<$) :: a -> Error exc m b -> Error exc m a #

(Carrier sig m, Effect sig, Monad m) => Carrier (Error e :+: sig) (ErrorC e m) Source # 
Instance details

Defined in Control.Effect.Error

Methods

ret :: a -> ErrorC e m a Source #

eff :: (Error e :+: sig) (ErrorC e m) (ErrorC e m a) -> ErrorC e m a Source #

data CullC m a Source #

Instances
(Alternative m, Carrier sig m, Effect sig, Monad m) => Carrier (Cull :+: (NonDet :+: sig)) (CullC m) Source # 
Instance details

Defined in Control.Effect.Cull

Methods

ret :: a -> CullC m a Source #

eff :: (Cull :+: (NonDet :+: sig)) (CullC m) (CullC m a) -> CullC m a Source #

data Cull m k Source #

Cull effects are used with NonDet to provide control over branching.

Instances
Effect Cull Source # 
Instance details

Defined in Control.Effect.Cull

Methods

handle :: Functor f => f () -> (forall x. f (m x) -> n (f x)) -> Cull m (m a) -> Cull n (n (f a)) Source #

HFunctor Cull Source # 
Instance details

Defined in Control.Effect.Cull

Methods

fmap' :: (a -> b) -> Cull m a -> Cull m b Source #

hmap :: (forall x. m x -> n x) -> Cull m a -> Cull n a Source #

Functor (Cull m) Source # 
Instance details

Defined in Control.Effect.Cull

Methods

fmap :: (a -> b) -> Cull m a -> Cull m b #

(<$) :: a -> Cull m b -> Cull m a #

(Alternative m, Carrier sig m, Effect sig, Monad m) => Carrier (Cull :+: (NonDet :+: sig)) (CullC m) Source # 
Instance details

Defined in Control.Effect.Cull

Methods

ret :: a -> CullC m a Source #

eff :: (Cull :+: (NonDet :+: sig)) (CullC m) (CullC m a) -> CullC m a Source #

data OnceC f m a Source #

Instances
(Alternative f, Carrier sig m, Effect sig, Traversable f, Monad f, Monad m) => Carrier (NonDet :+: sig) (OnceC f m) Source # 
Instance details

Defined in Control.Effect.NonDet

Methods

ret :: a -> OnceC f m a Source #

eff :: (NonDet :+: sig) (OnceC f m) (OnceC f m a) -> OnceC f m a Source #

data AltC f m a Source #

Instances
(Alternative f, Monad f, Traversable f, Carrier sig m, Effect sig, Applicative m) => Carrier (NonDet :+: sig) (AltC f m) Source # 
Instance details

Defined in Control.Effect.NonDet

Methods

ret :: a -> AltC f m a Source #

eff :: (NonDet :+: sig) (AltC f m) (AltC f m a) -> AltC f m a Source #

data CutC m a Source #

Instances
(Alternative m, Carrier sig m, Effect sig, Monad m) => Carrier (Cut :+: (NonDet :+: sig)) (CutC m) Source # 
Instance details

Defined in Control.Effect.Cut

Methods

ret :: a -> CutC m a Source #

eff :: (Cut :+: (NonDet :+: sig)) (CutC m) (CutC m a) -> CutC m a Source #

data Cut m k Source #

Cut effects are used with NonDet to provide control over backtracking.

Instances
Effect Cut Source # 
Instance details

Defined in Control.Effect.Cut

Methods

handle :: Functor f => f () -> (forall x. f (m x) -> n (f x)) -> Cut m (m a) -> Cut n (n (f a)) Source #

HFunctor Cut Source # 
Instance details

Defined in Control.Effect.Cut

Methods

fmap' :: (a -> b) -> Cut m a -> Cut m b Source #

hmap :: (forall x. m x -> n x) -> Cut m a -> Cut n a Source #

Functor (Cut m) Source # 
Instance details

Defined in Control.Effect.Cut

Methods

fmap :: (a -> b) -> Cut m a -> Cut m b #

(<$) :: a -> Cut m b -> Cut m a #

(Alternative m, Carrier sig m, Effect sig, Monad m) => Carrier (Cut :+: (NonDet :+: sig)) (CutC m) Source # 
Instance details

Defined in Control.Effect.Cut

Methods

ret :: a -> CutC m a Source #

eff :: (Cut :+: (NonDet :+: sig)) (CutC m) (CutC m a) -> CutC m a Source #

data TraceByReturningC m a Source #

Instances
(Carrier sig m, Effect sig) => Carrier (Trace :+: sig) (TraceByReturningC m) Source # 
Instance details

Defined in Control.Effect.Trace

data TraceByIgnoringC m a Source #

Instances
Carrier sig m => Carrier (Trace :+: sig) (TraceByIgnoringC m) Source # 
Instance details

Defined in Control.Effect.Trace

data TraceByPrintingC m a Source #

Instances
(MonadIO m, Carrier sig m) => Carrier (Trace :+: sig) (TraceByPrintingC m) Source # 
Instance details

Defined in Control.Effect.Trace

data Trace (m :: * -> *) k Source #

Instances
Effect Trace Source # 
Instance details

Defined in Control.Effect.Trace

Methods

handle :: Functor f => f () -> (forall x. f (m x) -> n (f x)) -> Trace m (m a) -> Trace n (n (f a)) Source #

HFunctor Trace Source # 
Instance details

Defined in Control.Effect.Trace

Methods

fmap' :: (a -> b) -> Trace m a -> Trace m b Source #

hmap :: (forall x. m x -> n x) -> Trace m a -> Trace n a Source #

Functor (Trace m) Source # 
Instance details

Defined in Control.Effect.Trace

Methods

fmap :: (a -> b) -> Trace m a -> Trace m b #

(<$) :: a -> Trace m b -> Trace m a #

(Carrier sig m, Effect sig) => Carrier (Trace :+: sig) (TraceByReturningC m) Source # 
Instance details

Defined in Control.Effect.Trace

Carrier sig m => Carrier (Trace :+: sig) (TraceByIgnoringC m) Source # 
Instance details

Defined in Control.Effect.Trace

(MonadIO m, Carrier sig m) => Carrier (Trace :+: sig) (TraceByPrintingC m) Source # 
Instance details

Defined in Control.Effect.Trace

data VoidC a Source #

Instances
Monad VoidC Source # 
Instance details

Defined in Control.Effect.Void

Methods

(>>=) :: VoidC a -> (a -> VoidC b) -> VoidC b #

(>>) :: VoidC a -> VoidC b -> VoidC b #

return :: a -> VoidC a #

fail :: String -> VoidC a #

Functor VoidC Source # 
Instance details

Defined in Control.Effect.Void

Methods

fmap :: (a -> b) -> VoidC a -> VoidC b #

(<$) :: a -> VoidC b -> VoidC a #

Applicative VoidC Source # 
Instance details

Defined in Control.Effect.Void

Methods

pure :: a -> VoidC a #

(<*>) :: VoidC (a -> b) -> VoidC a -> VoidC b #

liftA2 :: (a -> b -> c) -> VoidC a -> VoidC b -> VoidC c #

(*>) :: VoidC a -> VoidC b -> VoidC b #

(<*) :: VoidC a -> VoidC b -> VoidC a #

Carrier Void VoidC Source # 
Instance details

Defined in Control.Effect.Void

Methods

ret :: a -> VoidC a Source #

eff :: Void VoidC (VoidC a) -> VoidC a Source #

data Void (m :: * -> *) k Source #

Instances
Effect Void Source # 
Instance details

Defined in Control.Effect.Void

Methods

handle :: Functor f => f () -> (forall x. f (m x) -> n (f x)) -> Void m (m a) -> Void n (n (f a)) Source #

HFunctor Void Source # 
Instance details

Defined in Control.Effect.Void

Methods

fmap' :: (a -> b) -> Void m a -> Void m b Source #

hmap :: (forall x. m x -> n x) -> Void m a -> Void n a Source #

Carrier Void VoidC Source # 
Instance details

Defined in Control.Effect.Void

Methods

ret :: a -> VoidC a Source #

eff :: Void VoidC (VoidC a) -> VoidC a Source #

Functor (Void m) Source # 
Instance details

Defined in Control.Effect.Void

Methods

fmap :: (a -> b) -> Void m a -> Void m b #

(<$) :: a -> Void m b -> Void m a #

run :: Eff VoidC a -> a Source #

Run an Eff exhausted of effects to produce its final result value.

data WriterC w m a Source #

A space-efficient carrier for Writer effects.

This is based on a post Gabriel Gonzalez made to the Haskell mailing list: https://mail.haskell.org/pipermail/libraries/2013-March/019528.html

Note that currently, the constant-space behaviour observed there only occurs when using WriterC and VoidC without Eff wrapping them. See the benchmark component for details.

Instances
(Monad m, Monoid w) => Monad (WriterC w m) Source # 
Instance details

Defined in Control.Effect.Writer

Methods

(>>=) :: WriterC w m a -> (a -> WriterC w m b) -> WriterC w m b #

(>>) :: WriterC w m a -> WriterC w m b -> WriterC w m b #

return :: a -> WriterC w m a #

fail :: String -> WriterC w m a #

Functor m => Functor (WriterC w m) Source # 
Instance details

Defined in Control.Effect.Writer

Methods

fmap :: (a -> b) -> WriterC w m a -> WriterC w m b #

(<$) :: a -> WriterC w m b -> WriterC w m a #

(Monad m, Monoid w) => Applicative (WriterC w m) Source # 
Instance details

Defined in Control.Effect.Writer

Methods

pure :: a -> WriterC w m a #

(<*>) :: WriterC w m (a -> b) -> WriterC w m a -> WriterC w m b #

liftA2 :: (a -> b -> c) -> WriterC w m a -> WriterC w m b -> WriterC w m c #

(*>) :: WriterC w m a -> WriterC w m b -> WriterC w m b #

(<*) :: WriterC w m a -> WriterC w m b -> WriterC w m a #

(Monoid w, Carrier sig m, Effect sig, Monad m) => Carrier (Writer w :+: sig) (WriterC w m) Source # 
Instance details

Defined in Control.Effect.Writer

Methods

ret :: a -> WriterC w m a Source #

eff :: (Writer w :+: sig) (WriterC w m) (WriterC w m a) -> WriterC w m a Source #

data Writer w m k Source #

Instances
Effect (Writer w) Source # 
Instance details

Defined in Control.Effect.Writer

Methods

handle :: Functor f => f () -> (forall x. f (m x) -> n (f x)) -> Writer w m (m a) -> Writer w n (n (f a)) Source #

HFunctor (Writer w) Source # 
Instance details

Defined in Control.Effect.Writer

Methods

fmap' :: (a -> b) -> Writer w m a -> Writer w m b Source #

hmap :: (forall x. m x -> n x) -> Writer w m a -> Writer w n a Source #

Functor (Writer w m) Source # 
Instance details

Defined in Control.Effect.Writer

Methods

fmap :: (a -> b) -> Writer w m a -> Writer w m b #

(<$) :: a -> Writer w m b -> Writer w m a #

(Monoid w, Carrier sig m, Effect sig, Monad m) => Carrier (Writer w :+: sig) (WriterC w m) Source # 
Instance details

Defined in Control.Effect.Writer

Methods

ret :: a -> WriterC w m a Source #

eff :: (Writer w :+: sig) (WriterC w m) (WriterC w m a) -> WriterC w m a Source #