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

Control.Effect.Type.Split

Synopsis

Documentation

data Split :: Effect where Source #

An effect for splitting a nondeterministic computation into its head and tail.

Split is typically used as a primitive effect. If you define a Carrier that relies on a novel non-trivial monad transformer, then you need to make a ThreadsEff instance for that monad transformer to lift Split (if possible).

The following threading constraints accept Split:

Constructors

Split :: (Maybe (a, m a) -> b) -> m a -> Split m b 

Instances

Instances details
Monoid s => ThreadsEff (WriterT s) Split Source # 
Instance details

Defined in Control.Effect.Type.Split

Methods

threadEff :: Monad m => (forall x. Split m x -> m x) -> Split (WriterT s m) a -> WriterT s m a Source #

ThreadsEff (StateT s) Split Source # 
Instance details

Defined in Control.Effect.Type.Split

Methods

threadEff :: Monad m => (forall x. Split m x -> m x) -> Split (StateT s m) a -> StateT s m a Source #

ThreadsEff (ReaderT s) Split Source # 
Instance details

Defined in Control.Effect.Type.Split

Methods

threadEff :: Monad m => (forall x. Split m x -> m x) -> Split (ReaderT s m) a -> ReaderT s m a Source #

ThreadsEff (StateT s) Split Source # 
Instance details

Defined in Control.Effect.Type.Split

Methods

threadEff :: Monad m => (forall x. Split m x -> m x) -> Split (StateT s m) a -> StateT s m a Source #

Monoid s => ThreadsEff (WriterT s) Split Source # 
Instance details

Defined in Control.Effect.Type.Split

Methods

threadEff :: Monad m => (forall x. Split m x -> m x) -> Split (WriterT s m) a -> WriterT s m a Source #

Monoid s => ThreadsEff (WriterT s) Split Source # 
Instance details

Defined in Control.Effect.Type.Split

Methods

threadEff :: Monad m => (forall x. Split m x -> m x) -> Split (WriterT s m) a -> WriterT s m a Source #