Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
- exit :: Monad m => MSF (MaybeT m) a b
- exitWhen :: Monad m => (a -> Bool) -> MSF (MaybeT m) a a
- exitIf :: Monad m => MSF (MaybeT m) Bool ()
- maybeExit :: Monad m => MSF (MaybeT m) (Maybe a) a
- inMaybeT :: Monad m => MSF (MaybeT m) (Maybe a) a
- untilMaybe :: Monad m => MSF m a b -> MSF m b Bool -> MSF (MaybeT m) a b
- catchMaybe :: (Functor m, Monad m) => MSF (MaybeT m) a b -> MSF m a b -> MSF m a b
- listToMaybeS :: Monad m => [b] -> MSF (MaybeT m) a b
- runMaybeS :: Monad m => MSF (MaybeT m) a b -> MSF m a (Maybe b)
- runMaybeS'' :: Monad m => MSF (MaybeT m) a b -> MSF m a (Maybe b)
- reactimateMaybe :: (Functor m, Monad m) => MSF (MaybeT m) () () -> m ()
- embed_ :: (Functor m, Monad m) => MSF m a () -> [a] -> m ()
- module Control.Monad.Trans.Maybe
- maybeToExceptS :: (Functor m, Monad m) => MSF (MaybeT m) a b -> MSF (ExceptT () m) a b
Throwing Nothing
as an exception ("exiting")
exitWhen :: Monad m => (a -> Bool) -> MSF (MaybeT m) a a Source #
Throw the exception when the condition becomes true on the input.
Catching Maybe exceptions
untilMaybe :: Monad m => MSF m a b -> MSF m b Bool -> MSF (MaybeT m) a b Source #
Run the first msf
until the second one produces True
from the output of the first.
catchMaybe :: (Functor m, Monad m) => MSF (MaybeT m) a b -> MSF m a b -> MSF m a b Source #
When an exception occurs in the first msf
, the second msf
is executed from there.
Converting to and from MaybeT
Running MaybeT
runMaybeS'' :: Monad m => MSF (MaybeT m) a b -> MSF m a (Maybe b) Source #
Different implementation, to study performance.
embed_ :: (Functor m, Monad m) => MSF m a () -> [a] -> m () Source #
Run an MSF fed from a list, discarding results. Useful when one needs to combine effects and streams (i.e., for testing purposes).
module Control.Monad.Trans.Maybe