Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- onNothing :: forall a m. Monad m => m a -> Maybe a -> m a
- onNothingM :: forall a m. Monad m => m a -> m (Maybe a) -> m a
- onLeft :: forall e a m. Monad m => (e -> m a) -> Either e a -> m a
- onLeftM :: forall e a m. Monad m => (e -> m a) -> m (Either e a) -> m a
- onLeft_ :: forall e a m. Monad m => m a -> Either e a -> m a
- onLeftM_ :: forall e a m. Monad m => m a -> m (Either e a) -> m a
- onMany :: forall a m. Monad m => (NonEmpty a -> m (Maybe a)) -> [a] -> m (Maybe a)
- onManyM :: forall a m. Monad m => (NonEmpty a -> m (Maybe a)) -> m [a] -> m (Maybe a)
- onMany_ :: forall a m. Monad m => m (Maybe a) -> [a] -> m (Maybe a)
- onManyM_ :: forall a m. Monad m => m (Maybe a) -> m [a] -> m (Maybe a)
Documentation
onNothing :: forall a m. Monad m => m a -> Maybe a -> m a Source #
Handle the case where a value is Nothing
.
onNothingM :: forall a m. Monad m => m a -> m (Maybe a) -> m a Source #
Handle the case where an effectful function returns Nothing
.
onLeft :: forall e a m. Monad m => (e -> m a) -> Either e a -> m a Source #
Handle the case where a value is Left
.
onLeftM :: forall e a m. Monad m => (e -> m a) -> m (Either e a) -> m a Source #
Handle the case where an effectful function returns Left
.
onLeft_ :: forall e a m. Monad m => m a -> Either e a -> m a Source #
Handle the case where a value is Left
.
onLeftM_ :: forall e a m. Monad m => m a -> m (Either e a) -> m a Source #
Handle the case where an effectful function returns Left
.
onMany :: forall a m. Monad m => (NonEmpty a -> m (Maybe a)) -> [a] -> m (Maybe a) Source #
Handle the case where a list with many (more than one) elements.
onManyM :: forall a m. Monad m => (NonEmpty a -> m (Maybe a)) -> m [a] -> m (Maybe a) Source #
Handle the case where an effectul function returns a list with many (more than one) elements.