monad-schedule-0.1.2.1: A new, simple, composable concurrency abstraction.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Control.Monad.Schedule.Sequence

Synopsis

Documentation

newtype SequenceT m a Source #

Any monad can be trivially scheduled by executing all actions sequentially.

Constructors

SequenceT 

Fields

Instances

Instances details
MonadTrans SequenceT Source # 
Instance details

Defined in Control.Monad.Schedule.Sequence

Methods

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

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

Defined in Control.Monad.Schedule.Sequence

Methods

liftIO :: IO a -> SequenceT m a #

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

Defined in Control.Monad.Schedule.Sequence

Methods

pure :: a -> SequenceT m a #

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

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

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

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

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

Defined in Control.Monad.Schedule.Sequence

Methods

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

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

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

Defined in Control.Monad.Schedule.Sequence

Methods

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

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

return :: a -> SequenceT m a #

Monad m => MonadSchedule (SequenceT m) Source #

Execute all actions in sequence and return their result when all of them are done. Essentially, this is sequenceA.

Instance details

Defined in Control.Monad.Schedule.Sequence

Methods

schedule :: NonEmpty (SequenceT m a) -> SequenceT m (NonEmpty a, [SequenceT m a]) Source #