unsequential-0.5.0.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.

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.