unsequential-0.5.2.1: An extension removing the sequentiality from monads

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

 Source # Methodslift :: Monad m => m a -> Unsequential m a # Functor m => Functor (Unsequential m) Source # Methodsfmap :: (a -> b) -> Unsequential m a -> Unsequential m b #(<\$) :: a -> Unsequential m b -> Unsequential m a # Source # Methodspure :: 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.