module Hackage.Security.Util.Exit where
import MyPrelude
import Control.Monad (liftM)
import Control.Monad.Except (ExceptT, runExceptT, throwError)
multipleExitPoints :: Monad m => ExceptT a m a -> m a
multipleExitPoints :: forall (m :: * -> *) a. Monad m => ExceptT a m a -> m a
multipleExitPoints = forall (m :: * -> *) a1 r. Monad m => (a1 -> r) -> m a1 -> m r
liftM forall a. Either a a -> a
aux forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall e (m :: * -> *) a. ExceptT e m a -> m (Either e a)
runExceptT
where
aux :: Either a a -> a
aux :: forall a. Either a a -> a
aux (Left a
a) = a
a
aux (Right a
a) = a
a
exit :: Monad m => e -> ExceptT e m a
exit :: forall (m :: * -> *) e a. Monad m => e -> ExceptT e m a
exit = forall e (m :: * -> *) a. MonadError e m => e -> m a
throwError