Mini.Transformers.MaybeT
Contents
Description
Extend a monad with the ability to terminate a computation without a value
newtype MaybeT m a Source #
A terminable transformer with inner monad m, return a
Constructors
Defined in Mini.Transformers.MaybeT
Methods
lift :: Monad m => m a -> MaybeT m a Source #
empty :: MaybeT m a #
(<|>) :: MaybeT m a -> MaybeT m a -> MaybeT m a #
some :: MaybeT m a -> MaybeT m [a] #
many :: MaybeT m a -> MaybeT m [a] #
pure :: a -> MaybeT m a #
(<*>) :: MaybeT m (a -> b) -> MaybeT m a -> MaybeT m b #
liftA2 :: (a -> b -> c) -> MaybeT m a -> MaybeT m b -> MaybeT m c #
(*>) :: MaybeT m a -> MaybeT m b -> MaybeT m b #
(<*) :: MaybeT m a -> MaybeT m b -> MaybeT m a #
fmap :: (a -> b) -> MaybeT m a -> MaybeT m b #
(<$) :: a -> MaybeT m b -> MaybeT m a #
(>>=) :: MaybeT m a -> (a -> MaybeT m b) -> MaybeT m b #
(>>) :: MaybeT m a -> MaybeT m b -> MaybeT m b #
return :: a -> MaybeT m a #
runMaybeT :: MaybeT m a -> m (Maybe a) Source #
Unwrap a MaybeT computation
MaybeT
nothing :: Monad m => MaybeT m a Source #
Terminate the computation without a value
anticipate :: Monad m => MaybeT m a -> MaybeT m (Maybe a) Source #
Run a computation and get its result