hw-prelude-0.0.3.0: Opinionated prelude library
Safe HaskellSafe-Inferred
LanguageHaskell2010

HaskellWorks.Error

Synopsis

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.

onMany_ :: forall a m. Monad m => 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 => 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.