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

Safe HaskellNone
LanguageHaskell2010

Control.Effect.NonDet

Contents

Synopsis

NonDet effect

data NonDet m k Source #

Constructors

Empty 
Choose (Bool -> m k) 
Instances
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' :: 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 :: NonDet m a -> Rep1 (NonDet m) a #

to1 :: 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.0-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)))

NonDet carrier

runNonDet :: (Alternative f, Applicative m) => NonDetC m a -> m (f a) Source #

Run a NonDet effect, collecting all branches’ results into an Alternative functor.

Using '[]' as the Alternative functor will produce all results, while Maybe will return only the first. However, unlike runNonDetOnce, this will still enumerate the entire search space before returning, meaning that it will diverge for infinite search spaces, even when using Maybe.

run (runNonDet (pure a)) === [a]
run (runNonDet (pure a)) === Just a

newtype NonDetC m a Source #

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

Constructors

NonDetC 

Fields

  • runNonDetC :: forall b. (a -> m b -> m b) -> m b -> m b

    A higher-order function receiving two parameters: a function to combine each solution with the rest of the solutions, and an action to run when no results are produced.

Instances
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 #

fail :: String -> 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 #

Re-exports

class Applicative f => Alternative (f :: Type -> Type) where #

A monoid on applicative functors.

If defined, some and many should be the least solutions of the equations:

Minimal complete definition

empty, (<|>)

Methods

empty :: f a #

The identity of <|>

(<|>) :: f a -> f a -> f a infixl 3 #

An associative binary operation

some :: f a -> f [a] #

One or more.

many :: f a -> f [a] #

Zero or more.

Instances
Alternative []

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

empty :: [a] #

(<|>) :: [a] -> [a] -> [a] #

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

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

Alternative Maybe

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

empty :: Maybe a #

(<|>) :: Maybe a -> Maybe a -> Maybe a #

some :: Maybe a -> Maybe [a] #

many :: Maybe a -> Maybe [a] #

Alternative IO

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

empty :: IO a #

(<|>) :: IO a -> IO a -> IO a #

some :: IO a -> IO [a] #

many :: IO a -> IO [a] #

Alternative Option

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

empty :: Option a #

(<|>) :: Option a -> Option a -> Option a #

some :: Option a -> Option [a] #

many :: Option a -> Option [a] #

Alternative ZipList

Since: base-4.11.0.0

Instance details

Defined in Control.Applicative

Methods

empty :: ZipList a #

(<|>) :: ZipList a -> ZipList a -> ZipList a #

some :: ZipList a -> ZipList [a] #

many :: ZipList a -> ZipList [a] #

Alternative ReadP

Since: base-4.6.0.0

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

empty :: ReadP a #

(<|>) :: ReadP a -> ReadP a -> ReadP a #

some :: ReadP a -> ReadP [a] #

many :: ReadP a -> ReadP [a] #

Alternative P

Since: base-4.5.0.0

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

empty :: P a #

(<|>) :: P a -> P a -> P a #

some :: P a -> P [a] #

many :: P a -> P [a] #

Alternative (U1 :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

empty :: U1 a #

(<|>) :: U1 a -> U1 a -> U1 a #

some :: U1 a -> U1 [a] #

many :: U1 a -> U1 [a] #

MonadPlus m => Alternative (WrappedMonad m)

Since: base-2.1

Instance details

Defined in Control.Applicative

Methods

empty :: WrappedMonad m a #

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

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

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

ArrowPlus a => Alternative (ArrowMonad a)

Since: base-4.6.0.0

Instance details

Defined in Control.Arrow

Methods

empty :: ArrowMonad a a0 #

(<|>) :: ArrowMonad a a0 -> ArrowMonad a a0 -> ArrowMonad a a0 #

some :: ArrowMonad a a0 -> ArrowMonad a [a0] #

many :: ArrowMonad a a0 -> ArrowMonad a [a0] #

Alternative (Proxy :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Proxy

Methods

empty :: Proxy a #

(<|>) :: Proxy a -> Proxy a -> Proxy a #

some :: Proxy a -> Proxy [a] #

many :: Proxy a -> Proxy [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 (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] #

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] #

(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 => 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 (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] #

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] #

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] #

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

Defined in Control.Effect.Trace

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

Defined in Control.Effect.Trace

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

Defined in Control.Effect.Trace

Alternative f => Alternative (Rec1 f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

empty :: Rec1 f a #

(<|>) :: Rec1 f a -> Rec1 f a -> Rec1 f a #

some :: Rec1 f a -> Rec1 f [a] #

many :: Rec1 f a -> Rec1 f [a] #

(ArrowZero a, ArrowPlus a) => Alternative (WrappedArrow a b)

Since: base-2.1

Instance details

Defined in Control.Applicative

Methods

empty :: WrappedArrow a b a0 #

(<|>) :: WrappedArrow a b a0 -> WrappedArrow a b a0 -> WrappedArrow a b a0 #

some :: WrappedArrow a b a0 -> WrappedArrow a b [a0] #

many :: WrappedArrow a b a0 -> WrappedArrow a b [a0] #

Alternative f => Alternative (Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

empty :: Ap f a #

(<|>) :: Ap f a -> Ap f a -> Ap f a #

some :: Ap f a -> Ap f [a] #

many :: Ap f a -> Ap f [a] #

Alternative f => Alternative (Alt f)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

empty :: Alt f a #

(<|>) :: Alt f a -> Alt f a -> Alt f a #

some :: Alt f a -> Alt f [a] #

many :: Alt f a -> Alt f [a] #

Alternative m => Alternative (IdentityT m) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

empty :: IdentityT m a #

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

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

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

(Functor m, Monad m, Error e) => Alternative (ErrorT e m) 
Instance details

Defined in Control.Monad.Trans.Error

Methods

empty :: ErrorT e m a #

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

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

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

Alternative m => Alternative (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

empty :: ReaderT r m a #

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

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

many :: ReaderT r m a -> ReaderT r 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) => Alternative (StateC s m) Source # 
Instance details

Defined in Control.Effect.State.Lazy

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 => 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) => 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 => Alternative (InterpretC eff m) Source # 
Instance details

Defined in Control.Effect.Interpret

Methods

empty :: InterpretC eff m a #

(<|>) :: InterpretC eff m a -> InterpretC eff m a -> InterpretC eff m a #

some :: InterpretC eff m a -> InterpretC eff m [a] #

many :: InterpretC eff m a -> InterpretC eff m [a] #

Alternative m => Alternative (InterposeC eff m) Source # 
Instance details

Defined in Control.Effect.Interpose

Methods

empty :: InterposeC eff m a #

(<|>) :: InterposeC eff m a -> InterposeC eff m a -> InterposeC eff m a #

some :: InterposeC eff m a -> InterposeC eff m [a] #

many :: InterposeC eff m a -> InterposeC eff 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 => 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 => 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) => 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 f, Alternative g) => Alternative (f :*: g)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

empty :: (f :*: g) a #

(<|>) :: (f :*: g) a -> (f :*: g) a -> (f :*: g) a #

some :: (f :*: g) a -> (f :*: g) [a] #

many :: (f :*: g) a -> (f :*: g) [a] #

(Alternative f, Alternative g) => Alternative (Product f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

Methods

empty :: Product f g a #

(<|>) :: Product f g a -> Product f g a -> Product f g a #

some :: Product f g a -> Product f g [a] #

many :: Product f g a -> Product f g [a] #

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

Defined in Control.Effect.Interpret

Methods

empty :: InterpretStateC eff s m a #

(<|>) :: InterpretStateC eff s m a -> InterpretStateC eff s m a -> InterpretStateC eff s m a #

some :: InterpretStateC eff s m a -> InterpretStateC eff s m [a] #

many :: InterpretStateC eff s m a -> InterpretStateC eff s m [a] #

Alternative f => Alternative (M1 i c f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

empty :: M1 i c f a #

(<|>) :: M1 i c f a -> M1 i c f a -> M1 i c f a #

some :: M1 i c f a -> M1 i c f [a] #

many :: M1 i c f a -> M1 i c f [a] #

(Alternative f, Applicative g) => Alternative (f :.: g)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

empty :: (f :.: g) a #

(<|>) :: (f :.: g) a -> (f :.: g) a -> (f :.: g) a #

some :: (f :.: g) a -> (f :.: g) [a] #

many :: (f :.: g) a -> (f :.: g) [a] #

(Alternative f, Applicative g) => Alternative (Compose f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

empty :: Compose f g a #

(<|>) :: Compose f g a -> Compose f g a -> Compose f g a #

some :: Compose f g a -> Compose f g [a] #

many :: Compose f g a -> Compose f g [a] #

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
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 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 #

run :: PureC a -> a Source #

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