universum-0.2.1: Custom prelude used in Serokell

Safe HaskellSafe
LanguageHaskell2010

Monad.Either

Description

Utilites to work with Either data type.

Documentation

maybeToLeft :: r -> Maybe l -> Either l r Source #

maybeToRight :: l -> Maybe r -> Either l r Source #

whenLeft :: Applicative f => Either l r -> (l -> f ()) -> f () Source #

whenLeftM :: Monad m => m (Either l r) -> (l -> m ()) -> m () Source #

whenRight :: Applicative f => Either l r -> (r -> f ()) -> f () Source #

whenRightM :: Monad m => m (Either l r) -> (r -> m ()) -> m () Source #