{-# 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 :: forall (m :: * -> *) a. MonadIO m => ExitCode -> m a
exitWith 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 :: forall (m :: * -> *) a. MonadIO m => 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 :: forall (m :: * -> *) a. MonadIO m => 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 :: forall (m :: * -> *) a. MonadIO m => String -> m a
die 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)