unsequential-0.5.2: An extension removing the sequentiality from monads

Safe HaskellNone
LanguageHaskell2010

Unsequential

Synopsis

Documentation

data Unsequential m a Source #

Allows to use the Applicative interface to compose the actions of the base monad while being abstracted from the order of their successful execution.

Instances

MonadTrans Unsequential Source # 

Methods

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

Functor m => Functor (Unsequential m) Source # 

Methods

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

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

Applicative m => Applicative (Unsequential m) Source # 

Methods

pure :: a -> Unsequential m a #

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

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

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

runUnsequential :: MonadPlus m => Unsequential m a -> m () -> m a Source #

Runs Unsequential given an implementation of the "skip" effect.

The "skip" effect can be just return () in case you don't want skipping or mzero if you want to fail on the attempt to skip.

unsequential :: Monad m => m a -> Unsequential m a Source #

Lift a computation in the base monad.

Same as lift.