{-# LANGUAGE Safe #-}
module Relude.Lifted.Exit
( exitWith
, exitFailure
, exitSuccess
, die
) where
import Control.Monad.Trans (MonadIO, liftIO)
import Data.String (String)
import System.Exit (ExitCode)
import qualified System.Exit as XIO
exitWith :: MonadIO m => ExitCode -> m a
exitWith :: ExitCode -> m a
exitWith a :: ExitCode
a = IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (ExitCode -> IO a
forall a. ExitCode -> IO a
XIO.exitWith ExitCode
a)
exitFailure :: MonadIO m => m a
exitFailure :: m a
exitFailure = IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO IO a
forall a. IO a
XIO.exitFailure
exitSuccess :: MonadIO m => m a
exitSuccess :: m a
exitSuccess = IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO IO a
forall a. IO a
XIO.exitSuccess
die :: MonadIO m => String -> m a
die :: String -> m a
die err :: String
err = IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (String -> IO a
forall a. String -> IO a
XIO.die String
err)