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

Control.Effect.Sum

Documentation

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

Constructors

L (f m k) 
R (g m k) 

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 Member (sub :: (* -> *) -> * -> *) sup where Source #

Methods

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

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

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 #