fused-effects-0.5.0.1: A fast, flexible, fused effect system.
Safe HaskellNone
LanguageHaskell2010

Control.Effect

Synopsis

Documentation

data PureC a Source #

Instances

Instances details
Monad PureC Source # 
Instance details

Defined in Control.Effect.Pure

Methods

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

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

return :: a -> PureC a #

Functor PureC Source # 
Instance details

Defined in Control.Effect.Pure

Methods

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

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

MonadFix PureC Source # 
Instance details

Defined in Control.Effect.Pure

Methods

mfix :: (a -> PureC a) -> PureC a #

Applicative PureC Source # 
Instance details

Defined in Control.Effect.Pure

Methods

pure :: a -> PureC a #

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

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

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

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

Carrier Pure PureC Source # 
Instance details

Defined in Control.Effect.Carrier

Methods

eff :: Pure PureC a -> PureC a Source #

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

Instances

Instances details
Effect Pure Source # 
Instance details

Defined in Control.Effect.Carrier

Methods

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

HFunctor Pure Source # 
Instance details

Defined in Control.Effect.Carrier

Methods

fmap' :: forall (f :: Type -> Type) a b. Functor (Pure f) => (a -> b) -> Pure f a -> Pure f b Source #

hmap :: Functor m => (forall x. m x -> n x) -> Pure m a -> Pure n a Source #

Carrier Pure PureC Source # 
Instance details

Defined in Control.Effect.Carrier

Methods

eff :: Pure PureC a -> PureC a Source #

Functor (Pure m) Source # 
Instance details

Defined in Control.Effect.Pure

Methods

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

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

Generic1 (Pure m :: Type -> Type) Source # 
Instance details

Defined in Control.Effect.Pure

Associated Types

type Rep1 (Pure m) :: k -> Type #

Methods

from1 :: forall (a :: k). Pure m a -> Rep1 (Pure m) a #

to1 :: forall (a :: k). Rep1 (Pure m) a -> Pure m a #

type Rep1 (Pure m :: Type -> Type) Source # 
Instance details

Defined in Control.Effect.Pure

type Rep1 (Pure m :: Type -> Type) = D1 ('MetaData "Pure" "Control.Effect.Pure" "fused-effects-0.5.0.1-inplace" 'False) (V1 :: Type -> Type)

run :: PureC a -> a Source #

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

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

Minimal complete definition

inj, prj

Instances

Instances details
Member sub sub Source # 
Instance details

Defined in Control.Effect.Sum

Methods

inj :: forall (m :: Type -> Type) a. sub m a -> sub m a Source #

prj :: forall (m :: Type -> Type) a. 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 :: forall (m :: Type -> Type) a. sub m a -> (sub' :+: sup) m a Source #

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

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

Defined in Control.Effect.Sum

Methods

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

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

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

Instances

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

Defined in Control.Effect.Sum

Methods

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

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

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

Defined in Control.Effect.Sum

Methods

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

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

Generic1 ((f :+: g) m :: Type -> Type) Source # 
Instance details

Defined in Control.Effect.Sum

Associated Types

type Rep1 ((f :+: g) m) :: k -> Type #

Methods

from1 :: forall (a :: k). (f :+: g) m a -> Rep1 ((f :+: g) m) a #

to1 :: forall (a :: k). Rep1 ((f :+: g) m) a -> (f :+: g) m a #

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

Defined in Control.Effect.Carrier

Methods

handle :: (Functor f0, Monad m) => f0 () -> (forall x. f0 (m x) -> n (f0 x)) -> (f :+: g) m a -> (f :+: g) n (f0 a) Source #

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

Defined in Control.Effect.Carrier

Methods

fmap' :: forall (f0 :: Type -> Type) a b. Functor ((f :+: g) f0) => (a -> b) -> (f :+: g) f0 a -> (f :+: g) f0 b Source #

hmap :: Functor m => (forall x. m x -> n x) -> (f :+: g) m a -> (f :+: g) n a Source #

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

Defined in Control.Effect.Resource

Methods

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

(Carrier sig m, Effect sig) => Carrier (NonDet :+: sig) (NonDetC m) Source # 
Instance details

Defined in Control.Effect.NonDet

Methods

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

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

Defined in Control.Effect.Cull

Methods

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

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

Defined in Control.Effect.Fresh

Methods

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

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

Defined in Control.Effect.Fail

Methods

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

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

Defined in Control.Effect.Cut

Methods

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

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

Defined in Control.Effect.Cull

Methods

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

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

Defined in Control.Effect.Trace

Methods

eff :: (Trace :+: sig) (TraceByReturningC m) a -> TraceByReturningC m a Source #

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

Defined in Control.Effect.Trace

Methods

eff :: (Trace :+: sig) (TraceByIgnoringC m) a -> TraceByIgnoringC m a Source #

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

Defined in Control.Effect.Trace

Methods

eff :: (Trace :+: sig) (TraceByPrintingC m) a -> TraceByPrintingC m a Source #

(HFunctor eff, Carrier sig m) => Carrier (eff :+: sig) (InterpretC eff m) Source # 
Instance details

Defined in Control.Effect.Interpret

Methods

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

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

Defined in Control.Effect.State.Strict

Methods

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

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

Defined in Control.Effect.State.Lazy

Methods

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

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

Defined in Control.Effect.Reader

Methods

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

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

Defined in Control.Effect.Random

Methods

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

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

Defined in Control.Effect.Error

Methods

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

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

Defined in Control.Effect.Resumable

Methods

eff :: (Resumable err :+: sig) (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

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

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

Defined in Control.Effect.Writer

Methods

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

(HFunctor eff, Carrier sig m, Effect sig) => Carrier (eff :+: sig) (InterpretStateC eff s m) Source # 
Instance details

Defined in Control.Effect.Interpret

Methods

eff :: (eff :+: sig) (InterpretStateC eff s m) a -> InterpretStateC eff s 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 #

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

Defined in Control.Effect.Sum

Methods

fold :: Monoid m0 => (f :+: g) m m0 -> m0 #

foldMap :: Monoid m0 => (a -> m0) -> (f :+: g) m a -> m0 #

foldMap' :: Monoid m0 => (a -> m0) -> (f :+: g) m a -> m0 #

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

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

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

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

foldr1 :: (a -> a -> a) -> (f :+: g) m a -> a #

foldl1 :: (a -> a -> a) -> (f :+: g) m a -> a #

toList :: (f :+: g) m a -> [a] #

null :: (f :+: g) m a -> Bool #

length :: (f :+: g) m a -> Int #

elem :: Eq a => a -> (f :+: g) m a -> Bool #

maximum :: Ord a => (f :+: g) m a -> a #

minimum :: Ord a => (f :+: g) m a -> a #

sum :: Num a => (f :+: g) m a -> a #

product :: Num a => (f :+: g) m a -> a #

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

Defined in Control.Effect.Sum

Methods

traverse :: Applicative f0 => (a -> f0 b) -> (f :+: g) m a -> f0 ((f :+: g) m b) #

sequenceA :: Applicative f0 => (f :+: g) m (f0 a) -> f0 ((f :+: g) m a) #

mapM :: Monad m0 => (a -> m0 b) -> (f :+: g) m a -> m0 ((f :+: g) m b) #

sequence :: Monad m0 => (f :+: g) m (m0 a) -> m0 ((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 #

type Rep1 ((f :+: g) m :: Type -> Type) Source # 
Instance details

Defined in Control.Effect.Sum

type Rep1 ((f :+: g) m :: Type -> Type) = D1 ('MetaData ":+:" "Control.Effect.Sum" "fused-effects-0.5.0.1-inplace" 'False) (C1 ('MetaCons "L" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 (f m))) :+: C1 ('MetaCons "R" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 (g m))))

class (HFunctor sig, Monad m) => Carrier sig m | m -> sig Source #

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

Minimal complete definition

eff

Instances

Instances details
Carrier Pure PureC Source # 
Instance details

Defined in Control.Effect.Carrier

Methods

eff :: Pure PureC a -> PureC a Source #

(HFunctor eff, Carrier sig m, Member eff sig) => Carrier sig (InterposeC eff m) Source # 
Instance details

Defined in Control.Effect.Interpose

Methods

eff :: sig (InterposeC eff m) a -> InterposeC eff m a Source #

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

Defined in Control.Effect.Lift

Methods

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

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

Defined in Control.Effect.Resource

Methods

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

(Carrier sig m, Effect sig) => Carrier (NonDet :+: sig) (NonDetC m) Source # 
Instance details

Defined in Control.Effect.NonDet

Methods

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

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

Defined in Control.Effect.Cull

Methods

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

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

Defined in Control.Effect.Fresh

Methods

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

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

Defined in Control.Effect.Fail

Methods

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

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

Defined in Control.Effect.Cut

Methods

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

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

Defined in Control.Effect.Cull

Methods

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

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

Defined in Control.Effect.Trace

Methods

eff :: (Trace :+: sig) (TraceByReturningC m) a -> TraceByReturningC m a Source #

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

Defined in Control.Effect.Trace

Methods

eff :: (Trace :+: sig) (TraceByIgnoringC m) a -> TraceByIgnoringC m a Source #

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

Defined in Control.Effect.Trace

Methods

eff :: (Trace :+: sig) (TraceByPrintingC m) a -> TraceByPrintingC m a Source #

(HFunctor eff, Carrier sig m) => Carrier (eff :+: sig) (InterpretC eff m) Source # 
Instance details

Defined in Control.Effect.Interpret

Methods

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

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

Defined in Control.Effect.State.Strict

Methods

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

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

Defined in Control.Effect.State.Lazy

Methods

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

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

Defined in Control.Effect.Reader

Methods

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

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

Defined in Control.Effect.Random

Methods

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

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

Defined in Control.Effect.Error

Methods

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

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

Defined in Control.Effect.Resumable

Methods

eff :: (Resumable err :+: sig) (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

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

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

Defined in Control.Effect.Writer

Methods

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

(HFunctor eff, Carrier sig m, Effect sig) => Carrier (eff :+: sig) (InterpretStateC eff s m) Source # 
Instance details

Defined in Control.Effect.Interpret

Methods

eff :: (eff :+: sig) (InterpretStateC eff s m) a -> InterpretStateC eff s 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.

All first-order effects (those without existential occurrences of m) admit a default definition of handle provided a Generic1 instance is available for the effect.

Instances

Instances details
Effect Pure Source # 
Instance details

Defined in Control.Effect.Carrier

Methods

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

Effect Resource Source # 
Instance details

Defined in Control.Effect.Resource

Methods

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

Effect Random Source # 
Instance details

Defined in Control.Effect.Random

Methods

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

Effect NonDet Source # 
Instance details

Defined in Control.Effect.NonDet

Methods

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

Effect Fresh Source # 
Instance details

Defined in Control.Effect.Fresh

Methods

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

Effect Fail Source # 
Instance details

Defined in Control.Effect.Fail

Methods

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

Effect Cut Source # 
Instance details

Defined in Control.Effect.Cut

Methods

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

Effect Cull Source # 
Instance details

Defined in Control.Effect.Cull

Methods

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

Effect Trace Source # 
Instance details

Defined in Control.Effect.Trace

Methods

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

Effect (State s) Source # 
Instance details

Defined in Control.Effect.State.Internal

Methods

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

Effect (Reader r) Source # 
Instance details

Defined in Control.Effect.Reader

Methods

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

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

Defined in Control.Effect.Lift

Methods

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

Effect (Error exc) Source # 
Instance details

Defined in Control.Effect.Error

Methods

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

Effect (Resumable err) Source # 
Instance details

Defined in Control.Effect.Resumable

Methods

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

Effect (Writer w) Source # 
Instance details

Defined in Control.Effect.Writer

Methods

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

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

Defined in Control.Effect.Carrier

Methods

handle :: (Functor f0, Monad m) => f0 () -> (forall x. f0 (m x) -> n (f0 x)) -> (f :+: g) m a -> (f :+: g) n (f0 a) Source #

data State s m k Source #

Instances

Instances details
Effect (State s) Source # 
Instance details

Defined in Control.Effect.State.Internal

Methods

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

HFunctor (State s) Source # 
Instance details

Defined in Control.Effect.State.Internal

Methods

fmap' :: forall (f :: Type -> Type) a b. Functor (State s f) => (a -> b) -> State s f a -> State s f b Source #

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

Generic1 (State s m :: Type -> Type) Source # 
Instance details

Defined in Control.Effect.State.Internal

Associated Types

type Rep1 (State s m) :: k -> Type #

Methods

from1 :: forall (a :: k). State s m a -> Rep1 (State s m) a #

to1 :: forall (a :: k). Rep1 (State s m) a -> State s m a #

Functor m => Functor (State s m) Source # 
Instance details

Defined in Control.Effect.State.Internal

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.Strict

Methods

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

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

Defined in Control.Effect.State.Lazy

Methods

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

type Rep1 (State s m :: Type -> Type) Source # 
Instance details

Defined in Control.Effect.State.Internal

type Rep1 (State s m :: Type -> Type) = D1 ('MetaData "State" "Control.Effect.State.Internal" "fused-effects-0.5.0.1-inplace" 'False) (C1 ('MetaCons "Get" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (((->) s :: Type -> Type) :.: Rec1 m)) :+: C1 ('MetaCons "Put" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 s) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 m)))

data StateC s m a Source #

Instances

Instances details
MonadTrans (StateC s) Source # 
Instance details

Defined in Control.Effect.State.Strict

Methods

lift :: Monad m => m a -> StateC s m a #

Monad m => Monad (StateC s m) Source # 
Instance details

Defined in Control.Effect.State.Strict

Methods

(>>=) :: StateC s m a -> (a -> StateC s m b) -> StateC s m b #

(>>) :: StateC s m a -> StateC s m b -> StateC s m b #

return :: a -> StateC s m a #

Functor m => Functor (StateC s m) Source # 
Instance details

Defined in Control.Effect.State.Strict

Methods

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

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

MonadFix m => MonadFix (StateC s m) Source # 
Instance details

Defined in Control.Effect.State.Strict

Methods

mfix :: (a -> StateC s m a) -> StateC s m a #

MonadFail m => MonadFail (StateC s m) Source # 
Instance details

Defined in Control.Effect.State.Strict

Methods

fail :: String -> StateC s m a #

Monad m => Applicative (StateC s m) Source # 
Instance details

Defined in Control.Effect.State.Strict

Methods

pure :: a -> StateC s m a #

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

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

(*>) :: StateC s m a -> StateC s m b -> StateC s m b #

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

MonadIO m => MonadIO (StateC s m) Source # 
Instance details

Defined in Control.Effect.State.Strict

Methods

liftIO :: IO a -> StateC s m a #

(Alternative m, Monad m) => Alternative (StateC s m) Source # 
Instance details

Defined in Control.Effect.State.Strict

Methods

empty :: StateC s m a #

(<|>) :: StateC s m a -> StateC s m a -> StateC s m a #

some :: StateC s m a -> StateC s m [a] #

many :: StateC s m a -> StateC s m [a] #

(Alternative m, Monad m) => MonadPlus (StateC s m) Source # 
Instance details

Defined in Control.Effect.State.Strict

Methods

mzero :: StateC s m a #

mplus :: StateC s m a -> StateC s m a -> StateC s m a #

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

Defined in Control.Effect.State.Strict

Methods

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

data ReaderC r m a Source #

Instances

Instances details
MonadTrans (ReaderC r) Source # 
Instance details

Defined in Control.Effect.Reader

Methods

lift :: Monad m => m a -> ReaderC r m a #

Monad m => Monad (ReaderC r m) Source # 
Instance details

Defined in Control.Effect.Reader

Methods

(>>=) :: ReaderC r m a -> (a -> ReaderC r m b) -> ReaderC r m b #

(>>) :: ReaderC r m a -> ReaderC r m b -> ReaderC r m b #

return :: a -> ReaderC r m a #

Functor m => Functor (ReaderC r m) Source # 
Instance details

Defined in Control.Effect.Reader

Methods

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

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

MonadFix m => MonadFix (ReaderC s m) Source # 
Instance details

Defined in Control.Effect.Reader

Methods

mfix :: (a -> ReaderC s m a) -> ReaderC s m a #

MonadFail m => MonadFail (ReaderC r m) Source # 
Instance details

Defined in Control.Effect.Reader

Methods

fail :: String -> ReaderC r m a #

Applicative m => Applicative (ReaderC r m) Source # 
Instance details

Defined in Control.Effect.Reader

Methods

pure :: a -> ReaderC r m a #

(<*>) :: ReaderC r m (a -> b) -> ReaderC r m a -> ReaderC r m b #

liftA2 :: (a -> b -> c) -> ReaderC r m a -> ReaderC r m b -> ReaderC r m c #

(*>) :: ReaderC r m a -> ReaderC r m b -> ReaderC r m b #

(<*) :: ReaderC r m a -> ReaderC r m b -> ReaderC r m a #

MonadIO m => MonadIO (ReaderC r m) Source # 
Instance details

Defined in Control.Effect.Reader

Methods

liftIO :: IO a -> ReaderC r m a #

Alternative m => Alternative (ReaderC r m) Source # 
Instance details

Defined in Control.Effect.Reader

Methods

empty :: ReaderC r m a #

(<|>) :: ReaderC r m a -> ReaderC r m a -> ReaderC r m a #

some :: ReaderC r m a -> ReaderC r m [a] #

many :: ReaderC r m a -> ReaderC r m [a] #

(Alternative m, Monad m) => MonadPlus (ReaderC r m) Source # 
Instance details

Defined in Control.Effect.Reader

Methods

mzero :: ReaderC r m a #

mplus :: ReaderC r m a -> ReaderC r m a -> ReaderC r m a #

MonadUnliftIO m => MonadUnliftIO (ReaderC r m) Source # 
Instance details

Defined in Control.Effect.Reader

Methods

askUnliftIO :: ReaderC r m (UnliftIO (ReaderC r m))

withRunInIO :: ((forall a. ReaderC r m a -> IO a) -> IO b) -> ReaderC r m b

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

Defined in Control.Effect.Reader

Methods

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

data Reader r m k Source #

Instances

Instances details
Effect (Reader r) Source # 
Instance details

Defined in Control.Effect.Reader

Methods

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

HFunctor (Reader r) Source # 
Instance details

Defined in Control.Effect.Reader

Methods

fmap' :: forall (f :: Type -> Type) a b. Functor (Reader r f) => (a -> b) -> Reader r f a -> Reader r f b Source #

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

Functor m => 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 => Carrier (Reader r :+: sig) (ReaderC r m) Source # 
Instance details

Defined in Control.Effect.Reader

Methods

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

data ResourceC m a Source #

Instances

Instances details
MonadTrans ResourceC Source # 
Instance details

Defined in Control.Effect.Resource

Methods

lift :: Monad m => m a -> ResourceC m a #

Monad m => Monad (ResourceC m) Source # 
Instance details

Defined in Control.Effect.Resource

Methods

(>>=) :: ResourceC m a -> (a -> ResourceC m b) -> ResourceC m b #

(>>) :: ResourceC m a -> ResourceC m b -> ResourceC m b #

return :: a -> ResourceC m a #

Functor m => Functor (ResourceC m) Source # 
Instance details

Defined in Control.Effect.Resource

Methods

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

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

MonadFix m => MonadFix (ResourceC m) Source # 
Instance details

Defined in Control.Effect.Resource

Methods

mfix :: (a -> ResourceC m a) -> ResourceC m a #

MonadFail m => MonadFail (ResourceC m) Source # 
Instance details

Defined in Control.Effect.Resource

Methods

fail :: String -> ResourceC m a #

Applicative m => Applicative (ResourceC m) Source # 
Instance details

Defined in Control.Effect.Resource

Methods

pure :: a -> ResourceC m a #

(<*>) :: ResourceC m (a -> b) -> ResourceC m a -> ResourceC m b #

liftA2 :: (a -> b -> c) -> ResourceC m a -> ResourceC m b -> ResourceC m c #

(*>) :: ResourceC m a -> ResourceC m b -> ResourceC m b #

(<*) :: ResourceC m a -> ResourceC m b -> ResourceC m a #

MonadIO m => MonadIO (ResourceC m) Source # 
Instance details

Defined in Control.Effect.Resource

Methods

liftIO :: IO a -> ResourceC m a #

Alternative m => Alternative (ResourceC m) Source # 
Instance details

Defined in Control.Effect.Resource

Methods

empty :: ResourceC m a #

(<|>) :: ResourceC m a -> ResourceC m a -> ResourceC m a #

some :: ResourceC m a -> ResourceC m [a] #

many :: ResourceC m a -> ResourceC m [a] #

(Alternative m, Monad m) => MonadPlus (ResourceC m) Source # 
Instance details

Defined in Control.Effect.Resource

Methods

mzero :: ResourceC m a #

mplus :: ResourceC m a -> ResourceC m a -> ResourceC m a #

MonadUnliftIO m => MonadUnliftIO (ResourceC m) Source # 
Instance details

Defined in Control.Effect.Resource

Methods

askUnliftIO :: ResourceC m (UnliftIO (ResourceC m))

withRunInIO :: ((forall a. ResourceC m a -> IO a) -> IO b) -> ResourceC m b

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

Defined in Control.Effect.Resource

Methods

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

data Resource m k Source #

Instances

Instances details
Effect Resource Source # 
Instance details

Defined in Control.Effect.Resource

Methods

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

HFunctor Resource Source # 
Instance details

Defined in Control.Effect.Resource

Methods

fmap' :: forall (f :: Type -> Type) a b. Functor (Resource f) => (a -> b) -> Resource f a -> Resource f b Source #

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

Functor m => 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

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

data RandomC g m a Source #

Instances

Instances details
MonadTrans (RandomC g) Source # 
Instance details

Defined in Control.Effect.Random

Methods

lift :: Monad m => m a -> RandomC g m a #

Monad m => Monad (RandomC g m) Source # 
Instance details

Defined in Control.Effect.Random

Methods

(>>=) :: RandomC g m a -> (a -> RandomC g m b) -> RandomC g m b #

(>>) :: RandomC g m a -> RandomC g m b -> RandomC g m b #

return :: a -> RandomC g m a #

Functor m => Functor (RandomC g m) Source # 
Instance details

Defined in Control.Effect.Random

Methods

fmap :: (a -> b) -> RandomC g m a -> RandomC g m b #

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

MonadFix m => MonadFix (RandomC g m) Source # 
Instance details

Defined in Control.Effect.Random

Methods

mfix :: (a -> RandomC g m a) -> RandomC g m a #

MonadFail m => MonadFail (RandomC g m) Source # 
Instance details

Defined in Control.Effect.Random

Methods

fail :: String -> RandomC g m a #

Monad m => Applicative (RandomC g m) Source # 
Instance details

Defined in Control.Effect.Random

Methods

pure :: a -> RandomC g m a #

(<*>) :: RandomC g m (a -> b) -> RandomC g m a -> RandomC g m b #

liftA2 :: (a -> b -> c) -> RandomC g m a -> RandomC g m b -> RandomC g m c #

(*>) :: RandomC g m a -> RandomC g m b -> RandomC g m b #

(<*) :: RandomC g m a -> RandomC g m b -> RandomC g m a #

MonadIO m => MonadIO (RandomC g m) Source # 
Instance details

Defined in Control.Effect.Random

Methods

liftIO :: IO a -> RandomC g m a #

(Alternative m, Monad m) => Alternative (RandomC g m) Source # 
Instance details

Defined in Control.Effect.Random

Methods

empty :: RandomC g m a #

(<|>) :: RandomC g m a -> RandomC g m a -> RandomC g m a #

some :: RandomC g m a -> RandomC g m [a] #

many :: RandomC g m a -> RandomC g m [a] #

(Alternative m, Monad m) => MonadPlus (RandomC g m) Source # 
Instance details

Defined in Control.Effect.Random

Methods

mzero :: RandomC g m a #

mplus :: RandomC g m a -> RandomC g m a -> RandomC g m a #

(Carrier sig m, Effect sig, RandomGen g) => MonadInterleave (RandomC g m) Source # 
Instance details

Defined in Control.Effect.Random

Methods

interleave :: RandomC g m a -> RandomC g m a #

(Carrier sig m, Effect sig, RandomGen g) => MonadRandom (RandomC g m) Source # 
Instance details

Defined in Control.Effect.Random

Methods

getRandomR :: Random a => (a, a) -> RandomC g m a #

getRandom :: Random a => RandomC g m a #

getRandomRs :: Random a => (a, a) -> RandomC g m [a] #

getRandoms :: Random a => RandomC g m [a] #

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

Defined in Control.Effect.Random

Methods

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

data Random m k Source #

Instances

Instances details
Effect Random Source # 
Instance details

Defined in Control.Effect.Random

Methods

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

HFunctor Random Source # 
Instance details

Defined in Control.Effect.Random

Methods

fmap' :: forall (f :: Type -> Type) a b. Functor (Random f) => (a -> b) -> Random f a -> Random f b Source #

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

Functor m => Functor (Random m) Source # 
Instance details

Defined in Control.Effect.Random

Methods

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

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

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

Defined in Control.Effect.Random

Methods

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

data NonDetC m a Source #

A carrier for NonDet effects based on Ralf Hinze’s design described in Deriving Backtracking Monad Transformers.

Instances

Instances details
MonadTrans NonDetC Source # 
Instance details

Defined in Control.Effect.NonDet

Methods

lift :: Monad m => m a -> NonDetC m a #

Monad (NonDetC m) Source # 
Instance details

Defined in Control.Effect.NonDet

Methods

(>>=) :: NonDetC m a -> (a -> NonDetC m b) -> NonDetC m b #

(>>) :: NonDetC m a -> NonDetC m b -> NonDetC m b #

return :: a -> NonDetC m a #

Functor (NonDetC m) Source # 
Instance details

Defined in Control.Effect.NonDet

Methods

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

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

MonadFix m => MonadFix (NonDetC m) Source # 
Instance details

Defined in Control.Effect.NonDet

Methods

mfix :: (a -> NonDetC m a) -> NonDetC m a #

MonadFail m => MonadFail (NonDetC m) Source # 
Instance details

Defined in Control.Effect.NonDet

Methods

fail :: String -> NonDetC m a #

Applicative (NonDetC m) Source # 
Instance details

Defined in Control.Effect.NonDet

Methods

pure :: a -> NonDetC m a #

(<*>) :: NonDetC m (a -> b) -> NonDetC m a -> NonDetC m b #

liftA2 :: (a -> b -> c) -> NonDetC m a -> NonDetC m b -> NonDetC m c #

(*>) :: NonDetC m a -> NonDetC m b -> NonDetC m b #

(<*) :: NonDetC m a -> NonDetC m b -> NonDetC m a #

MonadIO m => MonadIO (NonDetC m) Source # 
Instance details

Defined in Control.Effect.NonDet

Methods

liftIO :: IO a -> NonDetC m a #

Alternative (NonDetC m) Source # 
Instance details

Defined in Control.Effect.NonDet

Methods

empty :: NonDetC m a #

(<|>) :: NonDetC m a -> NonDetC m a -> NonDetC m a #

some :: NonDetC m a -> NonDetC m [a] #

many :: NonDetC m a -> NonDetC m [a] #

MonadPlus (NonDetC m) Source # 
Instance details

Defined in Control.Effect.NonDet

Methods

mzero :: NonDetC m a #

mplus :: NonDetC m a -> NonDetC m a -> NonDetC m a #

(Carrier sig m, Effect sig) => Carrier (NonDet :+: sig) (NonDetC m) Source # 
Instance details

Defined in Control.Effect.NonDet

Methods

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

data NonDet m k Source #

Instances

Instances details
Effect NonDet Source # 
Instance details

Defined in Control.Effect.NonDet

Methods

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

HFunctor NonDet Source # 
Instance details

Defined in Control.Effect.NonDet

Methods

fmap' :: forall (f :: Type -> Type) a b. Functor (NonDet f) => (a -> b) -> NonDet f a -> NonDet f b Source #

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

Functor m => Functor (NonDet m) Source # 
Instance details

Defined in Control.Effect.NonDet

Methods

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

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

Generic1 (NonDet m :: Type -> Type) Source # 
Instance details

Defined in Control.Effect.NonDet

Associated Types

type Rep1 (NonDet m) :: k -> Type #

Methods

from1 :: forall (a :: k). NonDet m a -> Rep1 (NonDet m) a #

to1 :: forall (a :: k). Rep1 (NonDet m) a -> NonDet m a #

(Carrier sig m, Effect sig) => Carrier (NonDet :+: sig) (NonDetC m) Source # 
Instance details

Defined in Control.Effect.NonDet

Methods

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

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

Defined in Control.Effect.Cull

Methods

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

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

Defined in Control.Effect.Cut

Methods

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

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

Defined in Control.Effect.Cull

Methods

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

type Rep1 (NonDet m :: Type -> Type) Source # 
Instance details

Defined in Control.Effect.NonDet

type Rep1 (NonDet m :: Type -> Type) = D1 ('MetaData "NonDet" "Control.Effect.NonDet" "fused-effects-0.5.0.1-inplace" 'False) (C1 ('MetaCons "Empty" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Choose" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (((->) Bool :: Type -> Type) :.: Rec1 m)))

data LiftC m a Source #

Instances

Instances details
MonadTrans LiftC Source # 
Instance details

Defined in Control.Effect.Lift

Methods

lift :: Monad m => m a -> LiftC m a #

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

Defined in Control.Effect.Lift

Methods

(>>=) :: LiftC m a -> (a -> LiftC m b) -> LiftC m b #

(>>) :: LiftC m a -> LiftC m b -> LiftC m b #

return :: a -> LiftC m a #

Functor m => Functor (LiftC m) Source # 
Instance details

Defined in Control.Effect.Lift

Methods

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

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

MonadFix m => MonadFix (LiftC m) Source # 
Instance details

Defined in Control.Effect.Lift

Methods

mfix :: (a -> LiftC m a) -> LiftC m a #

MonadFail m => MonadFail (LiftC m) Source # 
Instance details

Defined in Control.Effect.Lift

Methods

fail :: String -> LiftC m a #

Applicative m => Applicative (LiftC m) Source # 
Instance details

Defined in Control.Effect.Lift

Methods

pure :: a -> LiftC m a #

(<*>) :: LiftC m (a -> b) -> LiftC m a -> LiftC m b #

liftA2 :: (a -> b -> c) -> LiftC m a -> LiftC m b -> LiftC m c #

(*>) :: LiftC m a -> LiftC m b -> LiftC m b #

(<*) :: LiftC m a -> LiftC m b -> LiftC m a #

MonadIO m => MonadIO (LiftC m) Source # 
Instance details

Defined in Control.Effect.Lift

Methods

liftIO :: IO a -> LiftC m a #

Alternative m => Alternative (LiftC m) Source # 
Instance details

Defined in Control.Effect.Lift

Methods

empty :: LiftC m a #

(<|>) :: LiftC m a -> LiftC m a -> LiftC m a #

some :: LiftC m a -> LiftC m [a] #

many :: LiftC m a -> LiftC m [a] #

MonadPlus m => MonadPlus (LiftC m) Source # 
Instance details

Defined in Control.Effect.Lift

Methods

mzero :: LiftC m a #

mplus :: LiftC m a -> LiftC m a -> LiftC m a #

MonadUnliftIO m => MonadUnliftIO (LiftC m) Source # 
Instance details

Defined in Control.Effect.Lift

Methods

askUnliftIO :: LiftC m (UnliftIO (LiftC m))

withRunInIO :: ((forall a. LiftC m a -> IO a) -> IO b) -> LiftC m b

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

Defined in Control.Effect.Lift

Methods

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

data Lift sig m k Source #

Instances

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

Defined in Control.Effect.Lift

Methods

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

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

Defined in Control.Effect.Lift

Methods

fmap' :: forall (f :: Type -> Type) a b. Functor (Lift sig f) => (a -> b) -> Lift sig f a -> Lift sig f b Source #

hmap :: Functor m => (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

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

Functor sig => Generic1 (Lift sig m :: Type -> Type) Source # 
Instance details

Defined in Control.Effect.Lift

Associated Types

type Rep1 (Lift sig m) :: k -> Type #

Methods

from1 :: forall (a :: k). Lift sig m a -> Rep1 (Lift sig m) a #

to1 :: forall (a :: k). Rep1 (Lift sig m) a -> Lift sig m a #

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

Defined in Control.Effect.Lift

Methods

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

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

type Rep1 (Lift sig m :: Type -> Type) Source # 
Instance details

Defined in Control.Effect.Lift

type Rep1 (Lift sig m :: Type -> Type) = D1 ('MetaData "Lift" "Control.Effect.Lift" "fused-effects-0.5.0.1-inplace" 'True) (C1 ('MetaCons "Lift" 'PrefixI 'True) (S1 ('MetaSel ('Just "unLift") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (sig :.: Rec1 m)))

runM :: LiftC m a -> m a Source #

Extract a Lifted Monadic action from an effectful computation.

data FreshC m a Source #

Instances

Instances details
MonadTrans FreshC Source # 
Instance details

Defined in Control.Effect.Fresh

Methods

lift :: Monad m => m a -> FreshC m a #

Monad m => Monad (FreshC m) Source # 
Instance details

Defined in Control.Effect.Fresh

Methods

(>>=) :: FreshC m a -> (a -> FreshC m b) -> FreshC m b #

(>>) :: FreshC m a -> FreshC m b -> FreshC m b #

return :: a -> FreshC m a #

Functor m => Functor (FreshC m) Source # 
Instance details

Defined in Control.Effect.Fresh

Methods

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

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

MonadFix m => MonadFix (FreshC m) Source # 
Instance details

Defined in Control.Effect.Fresh

Methods

mfix :: (a -> FreshC m a) -> FreshC m a #

MonadFail m => MonadFail (FreshC m) Source # 
Instance details

Defined in Control.Effect.Fresh

Methods

fail :: String -> FreshC m a #

Monad m => Applicative (FreshC m) Source # 
Instance details

Defined in Control.Effect.Fresh

Methods

pure :: a -> FreshC m a #

(<*>) :: FreshC m (a -> b) -> FreshC m a -> FreshC m b #

liftA2 :: (a -> b -> c) -> FreshC m a -> FreshC m b -> FreshC m c #

(*>) :: FreshC m a -> FreshC m b -> FreshC m b #

(<*) :: FreshC m a -> FreshC m b -> FreshC m a #

MonadIO m => MonadIO (FreshC m) Source # 
Instance details

Defined in Control.Effect.Fresh

Methods

liftIO :: IO a -> FreshC m a #

(Alternative m, Monad m) => Alternative (FreshC m) Source # 
Instance details

Defined in Control.Effect.Fresh

Methods

empty :: FreshC m a #

(<|>) :: FreshC m a -> FreshC m a -> FreshC m a #

some :: FreshC m a -> FreshC m [a] #

many :: FreshC m a -> FreshC m [a] #

(Alternative m, Monad m) => MonadPlus (FreshC m) Source # 
Instance details

Defined in Control.Effect.Fresh

Methods

mzero :: FreshC m a #

mplus :: FreshC m a -> FreshC m a -> FreshC m a #

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

Defined in Control.Effect.Fresh

Methods

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

data Fresh m k Source #

Instances

Instances details
Effect Fresh Source # 
Instance details

Defined in Control.Effect.Fresh

Methods

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

HFunctor Fresh Source # 
Instance details

Defined in Control.Effect.Fresh

Methods

fmap' :: forall (f :: Type -> Type) a b. Functor (Fresh f) => (a -> b) -> Fresh f a -> Fresh f b Source #

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

Functor m => 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) => Carrier (Fresh :+: sig) (FreshC m) Source # 
Instance details

Defined in Control.Effect.Fresh

Methods

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

data ErrorC e m a Source #

Instances

Instances details
MonadTrans (ErrorC e) Source # 
Instance details

Defined in Control.Effect.Error

Methods

lift :: Monad m => m a -> ErrorC e m a #

Monad m => Monad (ErrorC e m) Source # 
Instance details

Defined in Control.Effect.Error

Methods

(>>=) :: ErrorC e m a -> (a -> ErrorC e m b) -> ErrorC e m b #

(>>) :: ErrorC e m a -> ErrorC e m b -> ErrorC e m b #

return :: a -> ErrorC e m a #

Functor m => Functor (ErrorC e m) Source # 
Instance details

Defined in Control.Effect.Error

Methods

fmap :: (a -> b) -> ErrorC e m a -> ErrorC e m b #

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

MonadFix m => MonadFix (ErrorC e m) Source # 
Instance details

Defined in Control.Effect.Error

Methods

mfix :: (a -> ErrorC e m a) -> ErrorC e m a #

MonadFail m => MonadFail (ErrorC e m) Source # 
Instance details

Defined in Control.Effect.Error

Methods

fail :: String -> ErrorC e m a #

Applicative m => Applicative (ErrorC e m) Source # 
Instance details

Defined in Control.Effect.Error

Methods

pure :: a -> ErrorC e m a #

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

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

(*>) :: ErrorC e m a -> ErrorC e m b -> ErrorC e m b #

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

MonadIO m => MonadIO (ErrorC e m) Source # 
Instance details

Defined in Control.Effect.Error

Methods

liftIO :: IO a -> ErrorC e m a #

Alternative m => Alternative (ErrorC e m) Source # 
Instance details

Defined in Control.Effect.Error

Methods

empty :: ErrorC e m a #

(<|>) :: ErrorC e m a -> ErrorC e m a -> ErrorC e m a #

some :: ErrorC e m a -> ErrorC e m [a] #

many :: ErrorC e m a -> ErrorC e m [a] #

(Alternative m, Monad m) => MonadPlus (ErrorC e m) Source # 
Instance details

Defined in Control.Effect.Error

Methods

mzero :: ErrorC e m a #

mplus :: ErrorC e m a -> ErrorC e m a -> ErrorC e m a #

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

Defined in Control.Effect.Error

Methods

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

data Error exc m k Source #

Instances

Instances details
Effect (Error exc) Source # 
Instance details

Defined in Control.Effect.Error

Methods

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

HFunctor (Error exc) Source # 
Instance details

Defined in Control.Effect.Error

Methods

fmap' :: forall (f :: Type -> Type) a b. Functor (Error exc f) => (a -> b) -> Error exc f a -> Error exc f b Source #

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

Functor m => 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) => Carrier (Error e :+: sig) (ErrorC e m) Source # 
Instance details

Defined in Control.Effect.Error

Methods

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

data ResumableWithC err m a Source #

Instances

Instances details
MonadTrans (ResumableWithC err) Source # 
Instance details

Defined in Control.Effect.Resumable

Methods

lift :: Monad m => m a -> ResumableWithC err m a #

Monad m => Monad (ResumableWithC err m) Source # 
Instance details

Defined in Control.Effect.Resumable

Methods

(>>=) :: ResumableWithC err m a -> (a -> ResumableWithC err m b) -> ResumableWithC err m b #

(>>) :: ResumableWithC err m a -> ResumableWithC err m b -> ResumableWithC err m b #

return :: a -> ResumableWithC err m a #

Functor m => Functor (ResumableWithC err m) Source # 
Instance details

Defined in Control.Effect.Resumable

Methods

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

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

MonadFix m => MonadFix (ResumableWithC err m) Source # 
Instance details

Defined in Control.Effect.Resumable

Methods

mfix :: (a -> ResumableWithC err m a) -> ResumableWithC err m a #

MonadFail m => MonadFail (ResumableWithC err m) Source # 
Instance details

Defined in Control.Effect.Resumable

Methods

fail :: String -> ResumableWithC err m a #

Applicative m => Applicative (ResumableWithC err m) Source # 
Instance details

Defined in Control.Effect.Resumable

Methods

pure :: a -> ResumableWithC err m a #

(<*>) :: ResumableWithC err m (a -> b) -> ResumableWithC err m a -> ResumableWithC err m b #

liftA2 :: (a -> b -> c) -> ResumableWithC err m a -> ResumableWithC err m b -> ResumableWithC err m c #

(*>) :: ResumableWithC err m a -> ResumableWithC err m b -> ResumableWithC err m b #

(<*) :: ResumableWithC err m a -> ResumableWithC err m b -> ResumableWithC err m a #

MonadIO m => MonadIO (ResumableWithC err m) Source # 
Instance details

Defined in Control.Effect.Resumable

Methods

liftIO :: IO a -> ResumableWithC err m a #

Alternative m => Alternative (ResumableWithC err m) Source # 
Instance details

Defined in Control.Effect.Resumable

Methods

empty :: ResumableWithC err m a #

(<|>) :: ResumableWithC err m a -> ResumableWithC err m a -> ResumableWithC err m a #

some :: ResumableWithC err m a -> ResumableWithC err m [a] #

many :: ResumableWithC err m a -> ResumableWithC err m [a] #

(Alternative m, Monad m) => MonadPlus (ResumableWithC err m) Source # 
Instance details

Defined in Control.Effect.Resumable

Methods

mzero :: ResumableWithC err m a #

mplus :: ResumableWithC err m a -> ResumableWithC err m a -> ResumableWithC err m a #

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

Defined in Control.Effect.Resumable

Methods

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

data ResumableC err m a Source #

Instances

Instances details
MonadTrans (ResumableC err) Source # 
Instance details

Defined in Control.Effect.Resumable

Methods

lift :: Monad m => m a -> ResumableC err m a #

Monad m => Monad (ResumableC err m) Source # 
Instance details

Defined in Control.Effect.Resumable

Methods

(>>=) :: ResumableC err m a -> (a -> ResumableC err m b) -> ResumableC err m b #

(>>) :: ResumableC err m a -> ResumableC err m b -> ResumableC err m b #

return :: a -> ResumableC err m a #

Functor m => Functor (ResumableC err m) Source # 
Instance details

Defined in Control.Effect.Resumable

Methods

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

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

MonadFix m => MonadFix (ResumableC err m) Source # 
Instance details

Defined in Control.Effect.Resumable

Methods

mfix :: (a -> ResumableC err m a) -> ResumableC err m a #

MonadFail m => MonadFail (ResumableC err m) Source # 
Instance details

Defined in Control.Effect.Resumable

Methods

fail :: String -> ResumableC err m a #

Applicative m => Applicative (ResumableC err m) Source # 
Instance details

Defined in Control.Effect.Resumable

Methods

pure :: a -> ResumableC err m a #

(<*>) :: ResumableC err m (a -> b) -> ResumableC err m a -> ResumableC err m b #

liftA2 :: (a -> b -> c) -> ResumableC err m a -> ResumableC err m b -> ResumableC err m c #

(*>) :: ResumableC err m a -> ResumableC err m b -> ResumableC err m b #

(<*) :: ResumableC err m a -> ResumableC err m b -> ResumableC err m a #

MonadIO m => MonadIO (ResumableC err m) Source # 
Instance details

Defined in Control.Effect.Resumable

Methods

liftIO :: IO a -> ResumableC err m a #

Alternative m => Alternative (ResumableC err m) Source # 
Instance details

Defined in Control.Effect.Resumable

Methods

empty :: ResumableC err m a #

(<|>) :: ResumableC err m a -> ResumableC err m a -> ResumableC err m a #

some :: ResumableC err m a -> ResumableC err m [a] #

many :: ResumableC err m a -> ResumableC err m [a] #

(Alternative m, Monad m) => MonadPlus (ResumableC err m) Source # 
Instance details

Defined in Control.Effect.Resumable

Methods

mzero :: ResumableC err m a #

mplus :: ResumableC err m a -> ResumableC err m a -> ResumableC err m a #

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

Defined in Control.Effect.Resumable

Methods

eff :: (Resumable err :+: sig) (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

Instances details
Effect (Resumable err) Source # 
Instance details

Defined in Control.Effect.Resumable

Methods

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

HFunctor (Resumable err) Source # 
Instance details

Defined in Control.Effect.Resumable

Methods

fmap' :: forall (f :: Type -> Type) a b. Functor (Resumable err f) => (a -> b) -> Resumable err f a -> Resumable err f b Source #

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

Functor m => 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 => Carrier (Resumable err :+: sig) (ResumableWithC err m) Source # 
Instance details

Defined in Control.Effect.Resumable

Methods

eff :: (Resumable err :+: sig) (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

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

data FailC m a Source #

Instances

Instances details
MonadTrans FailC Source # 
Instance details

Defined in Control.Effect.Fail

Methods

lift :: Monad m => m a -> FailC m a #

Monad m => Monad (FailC m) Source # 
Instance details

Defined in Control.Effect.Fail

Methods

(>>=) :: FailC m a -> (a -> FailC m b) -> FailC m b #

(>>) :: FailC m a -> FailC m b -> FailC m b #

return :: a -> FailC m a #

Functor m => Functor (FailC m) Source # 
Instance details

Defined in Control.Effect.Fail

Methods

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

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

MonadFix m => MonadFix (FailC m) Source # 
Instance details

Defined in Control.Effect.Fail

Methods

mfix :: (a -> FailC m a) -> FailC m a #

(Carrier sig m, Effect sig) => MonadFail (FailC m) Source # 
Instance details

Defined in Control.Effect.Fail

Methods

fail :: String -> FailC m a #

Applicative m => Applicative (FailC m) Source # 
Instance details

Defined in Control.Effect.Fail

Methods

pure :: a -> FailC m a #

(<*>) :: FailC m (a -> b) -> FailC m a -> FailC m b #

liftA2 :: (a -> b -> c) -> FailC m a -> FailC m b -> FailC m c #

(*>) :: FailC m a -> FailC m b -> FailC m b #

(<*) :: FailC m a -> FailC m b -> FailC m a #

MonadIO m => MonadIO (FailC m) Source # 
Instance details

Defined in Control.Effect.Fail

Methods

liftIO :: IO a -> FailC m a #

Alternative m => Alternative (FailC m) Source # 
Instance details

Defined in Control.Effect.Fail

Methods

empty :: FailC m a #

(<|>) :: FailC m a -> FailC m a -> FailC m a #

some :: FailC m a -> FailC m [a] #

many :: FailC m a -> FailC m [a] #

(Alternative m, Monad m) => MonadPlus (FailC m) Source # 
Instance details

Defined in Control.Effect.Fail

Methods

mzero :: FailC m a #

mplus :: FailC m a -> FailC m a -> FailC m a #

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

Defined in Control.Effect.Fail

Methods

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

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

Instances

Instances details
Effect Fail Source # 
Instance details

Defined in Control.Effect.Fail

Methods

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

HFunctor Fail Source # 
Instance details

Defined in Control.Effect.Fail

Methods

fmap' :: forall (f :: Type -> Type) a b. Functor (Fail f) => (a -> b) -> Fail f a -> Fail f b Source #

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

Functor (Fail m) Source # 
Instance details

Defined in Control.Effect.Fail

Methods

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

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

Generic1 (Fail m :: Type -> Type) Source # 
Instance details

Defined in Control.Effect.Fail

Associated Types

type Rep1 (Fail m) :: k -> Type #

Methods

from1 :: forall (a :: k). Fail m a -> Rep1 (Fail m) a #

to1 :: forall (a :: k). Rep1 (Fail m) a -> Fail m a #

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

Defined in Control.Effect.Fail

Methods

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

type Rep1 (Fail m :: Type -> Type) Source # 
Instance details

Defined in Control.Effect.Fail

type Rep1 (Fail m :: Type -> Type) = D1 ('MetaData "Fail" "Control.Effect.Fail" "fused-effects-0.5.0.1-inplace" 'True) (C1 ('MetaCons "Fail" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String)))

data CutC m a Source #

Instances

Instances details
MonadTrans CutC Source # 
Instance details

Defined in Control.Effect.Cut

Methods

lift :: Monad m => m a -> CutC m a #

Monad (CutC m) Source # 
Instance details

Defined in Control.Effect.Cut

Methods

(>>=) :: CutC m a -> (a -> CutC m b) -> CutC m b #

(>>) :: CutC m a -> CutC m b -> CutC m b #

return :: a -> CutC m a #

Functor (CutC m) Source # 
Instance details

Defined in Control.Effect.Cut

Methods

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

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

MonadFix m => MonadFix (CutC m) Source # 
Instance details

Defined in Control.Effect.Cut

Methods

mfix :: (a -> CutC m a) -> CutC m a #

MonadFail m => MonadFail (CutC m) Source # 
Instance details

Defined in Control.Effect.Cut

Methods

fail :: String -> CutC m a #

Applicative (CutC m) Source # 
Instance details

Defined in Control.Effect.Cut

Methods

pure :: a -> CutC m a #

(<*>) :: CutC m (a -> b) -> CutC m a -> CutC m b #

liftA2 :: (a -> b -> c) -> CutC m a -> CutC m b -> CutC m c #

(*>) :: CutC m a -> CutC m b -> CutC m b #

(<*) :: CutC m a -> CutC m b -> CutC m a #

MonadIO m => MonadIO (CutC m) Source # 
Instance details

Defined in Control.Effect.Cut

Methods

liftIO :: IO a -> CutC m a #

Alternative (CutC m) Source # 
Instance details

Defined in Control.Effect.Cut

Methods

empty :: CutC m a #

(<|>) :: CutC m a -> CutC m a -> CutC m a #

some :: CutC m a -> CutC m [a] #

many :: CutC m a -> CutC m [a] #

MonadPlus (CutC m) Source # 
Instance details

Defined in Control.Effect.Cut

Methods

mzero :: CutC m a #

mplus :: CutC m a -> CutC m a -> CutC m a #

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

Defined in Control.Effect.Cut

Methods

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

data Cut m k Source #

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

Instances

Instances details
Effect Cut Source # 
Instance details

Defined in Control.Effect.Cut

Methods

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

HFunctor Cut Source # 
Instance details

Defined in Control.Effect.Cut

Methods

fmap' :: forall (f :: Type -> Type) a b. Functor (Cut f) => (a -> b) -> Cut f a -> Cut f b Source #

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

Functor m => 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 #

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

Defined in Control.Effect.Cut

Methods

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

data OnceC m a Source #

Instances

Instances details
Monad (OnceC m) Source # 
Instance details

Defined in Control.Effect.Cull

Methods

(>>=) :: OnceC m a -> (a -> OnceC m b) -> OnceC m b #

(>>) :: OnceC m a -> OnceC m b -> OnceC m b #

return :: a -> OnceC m a #

Functor (OnceC m) Source # 
Instance details

Defined in Control.Effect.Cull

Methods

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

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

MonadFix m => MonadFix (OnceC m) Source # 
Instance details

Defined in Control.Effect.Cull

Methods

mfix :: (a -> OnceC m a) -> OnceC m a #

MonadFail m => MonadFail (OnceC m) Source # 
Instance details

Defined in Control.Effect.Cull

Methods

fail :: String -> OnceC m a #

Applicative (OnceC m) Source # 
Instance details

Defined in Control.Effect.Cull

Methods

pure :: a -> OnceC m a #

(<*>) :: OnceC m (a -> b) -> OnceC m a -> OnceC m b #

liftA2 :: (a -> b -> c) -> OnceC m a -> OnceC m b -> OnceC m c #

(*>) :: OnceC m a -> OnceC m b -> OnceC m b #

(<*) :: OnceC m a -> OnceC m b -> OnceC m a #

MonadIO m => MonadIO (OnceC m) Source # 
Instance details

Defined in Control.Effect.Cull

Methods

liftIO :: IO a -> OnceC m a #

Alternative (OnceC m) Source # 
Instance details

Defined in Control.Effect.Cull

Methods

empty :: OnceC m a #

(<|>) :: OnceC m a -> OnceC m a -> OnceC m a #

some :: OnceC m a -> OnceC m [a] #

many :: OnceC m a -> OnceC m [a] #

MonadPlus (OnceC m) Source # 
Instance details

Defined in Control.Effect.Cull

Methods

mzero :: OnceC m a #

mplus :: OnceC m a -> OnceC m a -> OnceC m a #

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

Defined in Control.Effect.Cull

Methods

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

data CullC m a Source #

Instances

Instances details
MonadTrans CullC Source # 
Instance details

Defined in Control.Effect.Cull

Methods

lift :: Monad m => m a -> CullC m a #

Monad (CullC m) Source # 
Instance details

Defined in Control.Effect.Cull

Methods

(>>=) :: CullC m a -> (a -> CullC m b) -> CullC m b #

(>>) :: CullC m a -> CullC m b -> CullC m b #

return :: a -> CullC m a #

Functor (CullC m) Source # 
Instance details

Defined in Control.Effect.Cull

Methods

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

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

MonadFix m => MonadFix (CullC m) Source # 
Instance details

Defined in Control.Effect.Cull

Methods

mfix :: (a -> CullC m a) -> CullC m a #

MonadFail m => MonadFail (CullC m) Source # 
Instance details

Defined in Control.Effect.Cull

Methods

fail :: String -> CullC m a #

Applicative (CullC m) Source # 
Instance details

Defined in Control.Effect.Cull

Methods

pure :: a -> CullC m a #

(<*>) :: CullC m (a -> b) -> CullC m a -> CullC m b #

liftA2 :: (a -> b -> c) -> CullC m a -> CullC m b -> CullC m c #

(*>) :: CullC m a -> CullC m b -> CullC m b #

(<*) :: CullC m a -> CullC m b -> CullC m a #

MonadIO m => MonadIO (CullC m) Source # 
Instance details

Defined in Control.Effect.Cull

Methods

liftIO :: IO a -> CullC m a #

Alternative (CullC m) Source # 
Instance details

Defined in Control.Effect.Cull

Methods

empty :: CullC m a #

(<|>) :: CullC m a -> CullC m a -> CullC m a #

some :: CullC m a -> CullC m [a] #

many :: CullC m a -> CullC m [a] #

MonadPlus (CullC m) Source # 
Instance details

Defined in Control.Effect.Cull

Methods

mzero :: CullC m a #

mplus :: CullC m a -> CullC m a -> CullC m a #

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

Defined in Control.Effect.Cull

Methods

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

data Cull m k Source #

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

Instances

Instances details
Effect Cull Source # 
Instance details

Defined in Control.Effect.Cull

Methods

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

HFunctor Cull Source # 
Instance details

Defined in Control.Effect.Cull

Methods

fmap' :: forall (f :: Type -> Type) a b. Functor (Cull f) => (a -> b) -> Cull f a -> Cull f b Source #

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

Functor m => 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 #

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

Defined in Control.Effect.Cull

Methods

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

data TraceByReturningC m a Source #

Instances

Instances details
MonadTrans TraceByReturningC Source # 
Instance details

Defined in Control.Effect.Trace

Methods

lift :: Monad m => m a -> TraceByReturningC m a #

Monad m => Monad (TraceByReturningC m) Source # 
Instance details

Defined in Control.Effect.Trace

Functor m => Functor (TraceByReturningC m) Source # 
Instance details

Defined in Control.Effect.Trace

Methods

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

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

MonadFix m => MonadFix (TraceByReturningC m) Source # 
Instance details

Defined in Control.Effect.Trace

Methods

mfix :: (a -> TraceByReturningC m a) -> TraceByReturningC m a #

MonadFail m => MonadFail (TraceByReturningC m) Source # 
Instance details

Defined in Control.Effect.Trace

Methods

fail :: String -> TraceByReturningC m a #

Monad m => Applicative (TraceByReturningC m) Source # 
Instance details

Defined in Control.Effect.Trace

MonadIO m => MonadIO (TraceByReturningC m) Source # 
Instance details

Defined in Control.Effect.Trace

Methods

liftIO :: IO a -> TraceByReturningC m a #

(Alternative m, Monad m) => Alternative (TraceByReturningC m) Source # 
Instance details

Defined in Control.Effect.Trace

(Alternative m, Monad m) => MonadPlus (TraceByReturningC m) Source # 
Instance details

Defined in Control.Effect.Trace

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

Defined in Control.Effect.Trace

Methods

eff :: (Trace :+: sig) (TraceByReturningC m) a -> TraceByReturningC m a Source #

data TraceByIgnoringC m a Source #

Instances

Instances details
MonadTrans TraceByIgnoringC Source # 
Instance details

Defined in Control.Effect.Trace

Methods

lift :: Monad m => m a -> TraceByIgnoringC m a #

Monad m => Monad (TraceByIgnoringC m) Source # 
Instance details

Defined in Control.Effect.Trace

Functor m => Functor (TraceByIgnoringC m) Source # 
Instance details

Defined in Control.Effect.Trace

Methods

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

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

MonadFix m => MonadFix (TraceByIgnoringC m) Source # 
Instance details

Defined in Control.Effect.Trace

Methods

mfix :: (a -> TraceByIgnoringC m a) -> TraceByIgnoringC m a #

MonadFail m => MonadFail (TraceByIgnoringC m) Source # 
Instance details

Defined in Control.Effect.Trace

Methods

fail :: String -> TraceByIgnoringC m a #

Applicative m => Applicative (TraceByIgnoringC m) Source # 
Instance details

Defined in Control.Effect.Trace

MonadIO m => MonadIO (TraceByIgnoringC m) Source # 
Instance details

Defined in Control.Effect.Trace

Methods

liftIO :: IO a -> TraceByIgnoringC m a #

Alternative m => Alternative (TraceByIgnoringC m) Source # 
Instance details

Defined in Control.Effect.Trace

MonadPlus m => MonadPlus (TraceByIgnoringC 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

Methods

eff :: (Trace :+: sig) (TraceByIgnoringC m) a -> TraceByIgnoringC m a Source #

data TraceByPrintingC m a Source #

Instances

Instances details
MonadTrans TraceByPrintingC Source # 
Instance details

Defined in Control.Effect.Trace

Methods

lift :: Monad m => m a -> TraceByPrintingC m a #

Monad m => Monad (TraceByPrintingC m) Source # 
Instance details

Defined in Control.Effect.Trace

Functor m => Functor (TraceByPrintingC m) Source # 
Instance details

Defined in Control.Effect.Trace

Methods

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

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

MonadFix m => MonadFix (TraceByPrintingC m) Source # 
Instance details

Defined in Control.Effect.Trace

Methods

mfix :: (a -> TraceByPrintingC m a) -> TraceByPrintingC m a #

MonadFail m => MonadFail (TraceByPrintingC m) Source # 
Instance details

Defined in Control.Effect.Trace

Methods

fail :: String -> TraceByPrintingC m a #

Applicative m => Applicative (TraceByPrintingC m) Source # 
Instance details

Defined in Control.Effect.Trace

MonadIO m => MonadIO (TraceByPrintingC m) Source # 
Instance details

Defined in Control.Effect.Trace

Methods

liftIO :: IO a -> TraceByPrintingC m a #

Alternative m => Alternative (TraceByPrintingC m) Source # 
Instance details

Defined in Control.Effect.Trace

MonadPlus m => MonadPlus (TraceByPrintingC 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

Methods

eff :: (Trace :+: sig) (TraceByPrintingC m) a -> TraceByPrintingC m a Source #

data Trace m k Source #

Instances

Instances details
Effect Trace Source # 
Instance details

Defined in Control.Effect.Trace

Methods

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

HFunctor Trace Source # 
Instance details

Defined in Control.Effect.Trace

Methods

fmap' :: forall (f :: Type -> Type) a b. Functor (Trace f) => (a -> b) -> Trace f a -> Trace f b Source #

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

Functor m => 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 #

Generic1 (Trace m :: Type -> Type) Source # 
Instance details

Defined in Control.Effect.Trace

Associated Types

type Rep1 (Trace m) :: k -> Type #

Methods

from1 :: forall (a :: k). Trace m a -> Rep1 (Trace m) a #

to1 :: forall (a :: k). Rep1 (Trace m) a -> Trace m a #

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

Defined in Control.Effect.Trace

Methods

eff :: (Trace :+: sig) (TraceByReturningC m) a -> TraceByReturningC m a Source #

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

Defined in Control.Effect.Trace

Methods

eff :: (Trace :+: sig) (TraceByIgnoringC m) a -> TraceByIgnoringC m a Source #

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

Defined in Control.Effect.Trace

Methods

eff :: (Trace :+: sig) (TraceByPrintingC m) a -> TraceByPrintingC m a Source #

type Rep1 (Trace m :: Type -> Type) Source # 
Instance details

Defined in Control.Effect.Trace

type Rep1 (Trace m :: Type -> Type) = D1 ('MetaData "Trace" "Control.Effect.Trace" "fused-effects-0.5.0.1-inplace" 'False) (C1 ('MetaCons "Trace" 'PrefixI 'True) (S1 ('MetaSel ('Just "traceMessage") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 String) :*: S1 ('MetaSel ('Just "traceCont") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 m)))

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

Instances

Instances details
MonadTrans (WriterC w) Source # 
Instance details

Defined in Control.Effect.Writer

Methods

lift :: Monad m => m a -> WriterC w m a #

Monad m => 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 #

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 #

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

Defined in Control.Effect.Writer

Methods

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

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

Defined in Control.Effect.Writer

Methods

fail :: String -> WriterC w m a #

Monad m => 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 #

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

Defined in Control.Effect.Writer

Methods

liftIO :: IO a -> WriterC w m a #

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

Defined in Control.Effect.Writer

Methods

empty :: WriterC w m a #

(<|>) :: WriterC w m a -> WriterC w m a -> WriterC w m a #

some :: WriterC w m a -> WriterC w m [a] #

many :: WriterC w m a -> WriterC w m [a] #

(Alternative m, Monad m) => MonadPlus (WriterC w m) Source # 
Instance details

Defined in Control.Effect.Writer

Methods

mzero :: WriterC w m a #

mplus :: WriterC w m a -> WriterC w m a -> WriterC w m a #

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

Defined in Control.Effect.Writer

Methods

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

data Writer w m k Source #

Instances

Instances details
Effect (Writer w) Source # 
Instance details

Defined in Control.Effect.Writer

Methods

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

HFunctor (Writer w) Source # 
Instance details

Defined in Control.Effect.Writer

Methods

fmap' :: forall (f :: Type -> Type) a b. Functor (Writer w f) => (a -> b) -> Writer w f a -> Writer w f b Source #

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

Functor m => 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) => Carrier (Writer w :+: sig) (WriterC w m) Source # 
Instance details

Defined in Control.Effect.Writer

Methods

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