-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | An Either monad transformer -- -- Drop in alternative to ExceptT. Uses a pattern synonym to maintain -- compatibility with the old EitherT types but is actually ExceptT under -- the covers. @package transformers-either @version 0.0.2 -- | This monad transformer extends Control.Monad.Trans.Except with -- a more familar Either naming. module Control.Monad.Trans.Either -- | Type alias for ExceptT type EitherT = ExceptT -- | Constructor for computations in the either monad. (The inverse of -- runEitherT). newEitherT :: m (Either x a) -> EitherT x m a -- | Extractor for computations in the either monad. (The inverse of -- newEitherT). runEitherT :: EitherT x m a -> m (Either x a) eitherT :: Monad m => (x -> m b) -> (a -> m b) -> EitherT x m a -> m b -- | Constructor for left computations. left :: Monad m => x -> EitherT x m a -- | Constructor for right computations. right :: Monad m => a -> EitherT x m a mapEitherT :: (m (Either x a) -> n (Either y b)) -> EitherT x m a -> EitherT y n b -- | Hoist an Either into an "EitherT m" hoistEither :: Monad m => Either x a -> EitherT x m a -- | Map the unwrapped computation using the given function. bimapEitherT :: Functor m => (x -> y) -> (a -> b) -> EitherT x m a -> EitherT y m b -- | Map the Left unwrapped computation using the given function. firstEitherT :: Functor m => (x -> y) -> EitherT x m a -> EitherT y m a -- | Map the Right unwrapped computation using the given function. secondEitherT :: Functor m => (a -> b) -> EitherT x m a -> EitherT x m b -- | Hoist a 'Maybe a' into a 'Right a' hoistMaybe :: Monad m => x -> Maybe a -> EitherT x m a -- | Hoist hoistEitherT :: (forall b. m b -> n b) -> EitherT x m a -> EitherT x n a module Control.Monad.Trans.Either.Exit -- | orDieWithCode with an exit code of 1 in case of an error orDie :: (e -> Text) -> EitherT e IO a -> IO a -- | An idiom for failing hard on EitherT errors. -- --